Commit 61ebabf8 authored by mcb's avatar mcb

no message

parent 64ed596f
{
"version": "1.0",
"parentId": "",
"mode": "0",
"projectId": "",
"name": "",
"scripts": {
"setting": {
"extract": "incremental", //增量或全量
"extractExpression": "where 1=1", //增量表达式
"targetBucketCounts": "",
"errorLimitRecord": "0",
"executorMemory": "",
"executorCores": "",
"totalExecutorCores": ""
},
"reader": {
"dbConnection": "",
"fileType": "",
"sourceHdfsPath": "",
"sourceHdfsFile": "",
"sourceFtpDir": "",
"sourceFtpFile": "",
"sourceSkipFtpFile": "",
"sourceCsvDelimiter": "",
"sourceCsvHeader": "",
"sourceCsvCharset": "",
"sourceCsvQuote": "",
"sourceFtpLoadDate": "",
"registerTableName": "",
"dayByDay": "false",
"column": [
{
"name": "",
"type": ""
}
]
},
"writer": {
"targetDbConnection": "",
"targetTable": "",
"targetFtpDir": "",
"targetFtpFile": "",
"targetCsvDelimiter": "",
"targetCsvHeader": "",
"targetCsvCharset": "",
"targetInsertMergeOverwrite": "",
"column": [
{
"name": "",
"type": "",
"isPk": "",
"isPt": "",
"rules": []
}
]
}
},
"treeId": 0,
"taskRules": [
{
"ruleId": "",
"ruleValue": {
"dv_fields": [
{
"fieldName": ""
}
],
"dvTime": {
"timeField": "",
"timeValue": {
"startTime": "",
"endTime": ""
}
}
}
}
]
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jz.dmp.modules.dao.DvTaskRuleTDao">
<resultMap type="com.jz.dmp.modules.model.DvTaskRuleT" id="DvTaskRuleTMap">
<result property="taskRuleId" column="task_rule_id" jdbcType="INTEGER"/>
<result property="taskId" column="task_id" jdbcType="VARCHAR"/>
<result property="ruleId" column="rule_id" jdbcType="INTEGER"/>
<result property="ruleValue" column="rule_value" jdbcType="VARCHAR"/>
<result property="delFlag" column="del_flag" jdbcType="OTHER"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
</resultMap>
<!--查询单个-->
<select id="queryById" resultMap="DvTaskRuleTMap">
select
task_rule_id, task_id, rule_id, rule_value, del_flag, create_time, create_by, update_by, update_time
from dmp_web.dv_task_rule_t
where task_rule_id = #{taskRuleId}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="DvTaskRuleTMap">
select
task_rule_id, task_id, rule_id, rule_value, del_flag, create_time, create_by, update_by, update_time
from dmp_web.dv_task_rule_t
limit #{offset}, #{limit}
</select>
<!--通过实体作为筛选条件查询-->
<select id="queryAll" resultMap="DvTaskRuleTMap">
select
task_rule_id, task_id, rule_id, rule_value, del_flag, create_time, create_by, update_by, update_time
from dmp_web.dv_task_rule_t
<where>
<if test="taskRuleId != null">
and task_rule_id = #{taskRuleId}
</if>
<if test="taskId != null and taskId != ''">
and task_id = #{taskId}
</if>
<if test="ruleId != null">
and rule_id = #{ruleId}
</if>
<if test="ruleValue != null and ruleValue != ''">
and rule_value = #{ruleValue}
</if>
<if test="delFlag != null">
and del_flag = #{delFlag}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="createBy != null and createBy != ''">
and create_by = #{createBy}
</if>
<if test="updateBy != null and updateBy != ''">
and update_by = #{updateBy}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
</where>
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="taskRuleId" useGeneratedKeys="true">
insert into dmp_web.dv_task_rule_t(task_id, rule_id, rule_value, del_flag, create_time, create_by, update_by, update_time)
values (#{taskId}, #{ruleId}, #{ruleValue}, #{delFlag}, #{createTime}, #{createBy}, #{updateBy}, #{updateTime})
</insert>
<insert id="insertBatch" keyProperty="taskRuleId" useGeneratedKeys="true" parameterType="com.jz.dmp.modules.model.DvTaskRuleT">
insert into dmp_web.dv_task_rule_t(task_id, rule_id, rule_value, del_flag, create_time, create_by, update_by, update_time)
values
<foreach collection="list" item="entity" separator=",">
(#{entity.taskId}, #{entity.ruleId}, #{entity.ruleValue}, #{entity.delFlag}, #{entity.createTime},
#{entity.createBy}, #{entity.updateBy}, #{entity.updateTime})
</foreach>
</insert>
<insert id="insertOrUpdateBatch" keyProperty="taskRuleId" useGeneratedKeys="true">
insert into dmp_web.dv_task_rule_t(task_id, rule_id, rule_value, del_flag, create_time, create_by, update_by,
update_time)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.taskId}, #{entity.ruleId}, #{entity.ruleValue}, #{entity.delFlag}, #{entity.createTime},
#{entity.createBy}, #{entity.updateBy}, #{entity.updateTime})
</foreach>
on duplicate key update
task_id = values(task_id) , rule_id = values(rule_id) , rule_value = values(rule_value) , del_flag =
values(del_flag) , create_time = values(create_time) , create_by = values(create_by) , update_by =
values(update_by) , update_time = values(update_time)
</insert>
<!--通过主键修改数据-->
<update id="update">
update dmp_web.dv_task_rule_t
<set>
<if test="taskId != null and taskId != ''">
task_id = #{taskId},
</if>
<if test="ruleId != null">
rule_id = #{ruleId},
</if>
<if test="ruleValue != null and ruleValue != ''">
rule_value = #{ruleValue},
</if>
<if test="delFlag != null">
del_flag = #{delFlag},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="createBy != null and createBy != ''">
create_by = #{createBy},
</if>
<if test="updateBy != null and updateBy != ''">
update_by = #{updateBy},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
</set>
where task_rule_id = #{taskRuleId}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete from dmp_web.dv_task_rule_t where task_rule_id = #{taskRuleId}
</delete>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment