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
adbb2fe5
Commit
adbb2fe5
authored
Jan 21, 2021
by
sml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
冲突解决
parent
2fe69a17
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
273 additions
and
39 deletions
+273
-39
DmpDevelopTaskDao.java
src/main/java/com/jz/dmp/modules/dao/DmpDevelopTaskDao.java
+17
-1
DmpDevelopTaskServiceImpl.java
...z/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
+214
-15
DmpDevelopTaskMapper.xml
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
+42
-23
No files found.
src/main/java/com/jz/dmp/modules/dao/DmpDevelopTaskDao.java
View file @
adbb2fe5
...
@@ -16,7 +16,12 @@ public interface DmpDevelopTaskDao {
...
@@ -16,7 +16,12 @@ public interface DmpDevelopTaskDao {
Map
getDmpTaskAndTreeInfo
(
String
taskId
)
throws
Exception
;
Map
getDmpTaskAndTreeInfo
(
String
taskId
)
throws
Exception
;
int
deleteTaskByTaskId
(
String
taskId
)
throws
Exception
;
/**
* 批量删除离线任务
*
* @author Bellamy
*/
int
deleteTaskByTaskId
(
Map
params
)
throws
Exception
;
int
deleteNavigationTreeByTreeId
(
String
treeId
)
throws
Exception
;
int
deleteNavigationTreeByTreeId
(
String
treeId
)
throws
Exception
;
...
@@ -45,5 +50,16 @@ public interface DmpDevelopTaskDao {
...
@@ -45,5 +50,16 @@ public interface DmpDevelopTaskDao {
* @throws Exception
* @throws Exception
*/
*/
public
List
<
DmpDevelopTask
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
public
List
<
DmpDevelopTask
>
findList
(
Map
<
String
,
Object
>
param
)
throws
Exception
;
/**
* @Title: get
* @Description: TODO(主键获取对象)
* @param @param id
* @param @return
* @param @throws Exception 参数
* @return DmpDevelopTask 返回类型
* @throws
*/
public
DmpDevelopTask
get
(
Long
id
)
throws
Exception
;
}
}
src/main/java/com/jz/dmp/modules/service/impl/DmpDevelopTaskServiceImpl.java
View file @
adbb2fe5
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
View file @
adbb2fe5
...
@@ -37,13 +37,22 @@
...
@@ -37,13 +37,22 @@
t1.TREE_ID as treeId
t1.TREE_ID as treeId
from dmp_develop_task t1
from dmp_develop_task t1
left join dmp_navigation_tree t2 on t1.TREE_ID=t2.ID
left join dmp_navigation_tree t2 on t1.TREE_ID=t2.ID
where 1=1 and t1.id = #{taskId}
where 1=1 and t1.
data_status ='1' and t1.
id = #{taskId}
</select>
</select>
<!--根据主键删除任务-->
<!--根据主键删除任务-->
<delete
id=
"deleteTaskByTaskId"
parameterType=
"string"
>
<update
id=
"deleteTaskByTaskId"
parameterType=
"java.util.Map"
>
delete from dmp_develop_task where id = #{taskId}
update dmp_develop_task
</delete>
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"dataStatus != null"
>
data_status = #{dataStatus},
</if>
</trim>
where id in
<foreach
collection=
"ids"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</update>
<!--根据主键删除资源树-->
<!--根据主键删除资源树-->
<delete
id=
"deleteNavigationTreeByTreeId"
parameterType=
"string"
>
<delete
id=
"deleteNavigationTreeByTreeId"
parameterType=
"string"
>
...
@@ -142,14 +151,15 @@
...
@@ -142,14 +151,15 @@
ID, datasource_id, TASK_TYPE, TYPE, SCHEDULE_TYPE, IS_SUBMIT, TASK_DESC, SCRIPT, DATA_STATUS
ID, datasource_id, TASK_TYPE, TYPE, SCHEDULE_TYPE, IS_SUBMIT, TASK_DESC, SCRIPT, DATA_STATUS
, CREATE_USER_ID, CREATE_TIME, UPDATE_USER_ID, UPDATE_TIME, TREE_ID, CHK_RESULT, SYNC_RESULT, CHK_TIME, SYNC_TIME, FLOW_HEADER, FLOW_JSON, VERSION, IS_GZIPED
, CREATE_USER_ID, CREATE_TIME, UPDATE_USER_ID, UPDATE_TIME, TREE_ID, CHK_RESULT, SYNC_RESULT, CHK_TIME, SYNC_TIME, FLOW_HEADER, FLOW_JSON, VERSION, IS_GZIPED
from dmp_develop_task
from dmp_develop_task
where TREE_ID = #{treeId}
where
data_status ='1' and
TREE_ID = #{treeId}
</select>
</select>
<!--数据运维-数据开发任务列表分页查询-->
<!--数据运维-数据开发任务列表分页查询-->
<select
id=
"queryDevTaskListPage"
resultType=
"com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto"
<select
id=
"queryDevTaskListPage"
resultType=
"com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto"
parameterType=
"com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq"
>
parameterType=
"com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq"
>
select
select
t1.id as taskId,
t1.id as treeId,
t2.id as taskId,
t1.name as taskName,
t1.name as taskName,
t1.type,
t1.type,
t1.create_user_id as createUserId,
t1.create_user_id as createUserId,
...
@@ -158,32 +168,36 @@
...
@@ -158,32 +168,36 @@
t3.real_name as userName
t3.real_name as userName
from
from
dmp_navigation_tree t1
dmp_navigation_tree t1
left join dmp_develop_task t2 on t2.TREE_ID=t1.ID
left join dmp_develop_task t2 on t2.TREE_ID=t1.ID
and t2.data_status ='1'
left join dmp_member t3 on t1.create_user_id=t3.user_id
left join dmp_member t3 on t1.create_user_id=t3.user_id
where 1=1 and t1.type='01'
where 1=1 and t1.type='01'
and t1.project_id = #{projectId}
and t1.project_id = #{projectId}
<if
test=
"t
reeId != null and treeId != ''"
>
and t1.id =#{tree
Id}
</if>
<if
test=
"t
askId != null and taskId != ''"
>
and t2.id =#{task
Id}
</if>
<if
test=
"treeIdOrName != null and treeIdOrName != ''"
>
and t1.name like concat('%',#{treeIdOrName},'%')
</if>
<if
test=
"treeIdOrName != null and treeIdOrName != ''"
>
and t1.name like concat('%',#{treeIdOrName},'%')
</if>
<if
test=
"taskType != null and taskType!= ''"
>
and t1.type=#{taskType}
</if>
<if
test=
"taskType != null and taskType!= ''"
>
and t1.type=#{taskType}
</if>
</select>
</select>
<select
id=
"findList"
resultMap=
"DmpDevelopTaskResultMap"
>
<select
id=
"findList"
resultMap=
"DmpDevelopTaskResultMap"
>
SELECT
SELECT
<include
refid=
"FIND_ALL_COLUMN"
/>
task.id,task.task_type,task.type,task.schedule_type,task.is_submit,task.task_desc,task.script,task.data_status,task.create_user_id,task.create_time,
FROM dmp_develop_task WHERE 1=1
task.update_user_id,task.update_time,task.tree_id,task.flow_header,
<if
test=
"taskType != null"
>
AND task_type = #{taskType}
</if>
task.flow_json, task.version,task.is_gziped
<if
test=
"type != null"
>
AND type = #{type}
</if>
FROM dmp_develop_task task left join dmp_navigation_tree tree ON task.tree_id=tree.id
<if
test=
"scheduleType != null"
>
AND schedule_type = #{scheduleType}
</if>
WHERE 1=1
<if
test=
"isSubmit != null"
>
AND is_submit = #{isSubmit}
</if>
<if
test=
"taskType != null"
>
AND task.task_type = #{taskType}
</if>
<if
test=
"taskDesc != null"
>
AND task_desc = #{taskDesc}
</if>
<if
test=
"type != null"
>
AND task.type = #{type}
</if>
<if
test=
"script != null"
>
AND script = #{script, jdbcType=BLOB,
<if
test=
"scheduleType != null"
>
AND task.schedule_type = #{scheduleType}
</if>
<if
test=
"isSubmit != null"
>
AND task.is_submit = #{isSubmit}
</if>
<if
test=
"taskDesc != null"
>
AND task.task_desc = #{taskDesc}
</if>
<if
test=
"script != null"
>
AND task.script = #{script, jdbcType=BLOB,
typeHandler=com.jz.common.persistence.CBTHandler}
</if>
typeHandler=com.jz.common.persistence.CBTHandler}
</if>
<if
test=
"dataStatus != null"
>
AND data_status = #{dataStatus}
</if>
<if
test=
"dataStatus != null"
>
AND task.data_status = #{dataStatus}
</if>
<if
test=
"treeId != null"
>
AND tree_id = #{treeId}
</if>
<if
test=
"treeId != null"
>
AND task.tree_id = #{treeId}
</if>
<if
test=
"flowHeader != null"
>
AND flow_header = #{flowHeader}
</if>
<if
test=
"flowHeader != null"
>
AND task.flow_header = #{flowHeader}
</if>
<if
test=
"flowJson != null"
>
AND flow_json = #{flowJson}
</if>
<if
test=
"flowJson != null"
>
AND task.flow_json = #{flowJson}
</if>
<if
test=
"version != null"
>
AND version = #{version}
</if>
<if
test=
"version != null"
>
AND task.version = #{version}
</if>
<if
test=
"gziped != null"
>
AND is_gziped = #{gziped}
</if>
<if
test=
"gziped != null"
>
AND task.is_gziped = #{gziped}
</if>
<if
test=
"projectId != null"
>
AND tree.project_id = #{projectId}
</if>
</select>
</select>
<select
id=
"queryTaskTreeInfo"
resultType=
"com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto"
>
<select
id=
"queryTaskTreeInfo"
resultType=
"com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto"
>
...
@@ -193,7 +207,7 @@
...
@@ -193,7 +207,7 @@
(case when t1.type='01' then '离线同步' when t1.type='02' then '实时同步' when t1.type='03' then '数据开发' end) as type
(case when t1.type='01' then '离线同步' when t1.type='02' then '实时同步' when t1.type='03' then '数据开发' end) as type
from
from
dmp_navigation_tree t1
dmp_navigation_tree t1
left join dmp_develop_task t2 on t2.TREE_ID=t1.ID
left join dmp_develop_task t2 on t2.TREE_ID=t1.ID
and t2.data_status ='1'
left join dmp_member t3 on t1.create_user_id=t3.user_id
left join dmp_member t3 on t1.create_user_id=t3.user_id
where 1=1 and t1.type='01'
where 1=1 and t1.type='01'
and t1.project_id = #{projectId}
and t1.project_id = #{projectId}
...
@@ -201,5 +215,10 @@
...
@@ -201,5 +215,10 @@
<if
test=
"taskName != null and taskName != ''"
>
and t1.name like concat('%',#{taskName},'%')
</if>
<if
test=
"taskName != null and taskName != ''"
>
and t1.name like concat('%',#{taskName},'%')
</if>
<if
test=
"taskType != null and taskType!= ''"
>
and t1.type=#{taskType}
</if>
<if
test=
"taskType != null and taskType!= ''"
>
and t1.type=#{taskType}
</if>
</select>
</select>
<!-- 主键获取对象 -->
<select
id=
"get"
parameterType=
"java.lang.Long"
resultMap=
"DmpDevelopTaskResultMap"
>
SELECT
<include
refid=
"FIND_ALL_COLUMN"
/>
FROM dmp_develop_task WHERE tree_id = #{id}
</select>
</mapper>
</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