Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
jz-dmp-service
Commits
61ebabf8
Commit
61ebabf8
authored
Dec 30, 2020
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
64ed596f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
214 additions
and
0 deletions
+214
-0
lxTaskJson.json
src/main/resources/lxTaskJson.json
+79
-0
DvTaskRuleTMapper.xml
src/main/resources/mapper/dmp/DvTaskRuleTMapper.xml
+135
-0
No files found.
src/main/resources/lxTaskJson.json
0 → 100644
View file @
61ebabf8
{
"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
src/main/resources/mapper/dmp/DvTaskRuleTMapper.xml
0 → 100644
View file @
61ebabf8
<?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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment