Commit adbb2fe5 authored by sml's avatar sml

冲突解决

parent 2fe69a17
......@@ -16,7 +16,12 @@ public interface DmpDevelopTaskDao {
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;
......@@ -45,5 +50,16 @@ public interface DmpDevelopTaskDao {
* @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;
}
......@@ -37,13 +37,22 @@
t1.TREE_ID as treeId
from dmp_develop_task t1
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>
<!--根据主键删除任务-->
<delete id="deleteTaskByTaskId" parameterType="string">
delete from dmp_develop_task where id = #{taskId}
</delete>
<update id="deleteTaskByTaskId" parameterType="java.util.Map">
update dmp_develop_task
<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">
......@@ -142,14 +151,15 @@
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
from dmp_develop_task
where TREE_ID = #{treeId}
where data_status ='1' and TREE_ID = #{treeId}
</select>
<!--数据运维-数据开发任务列表分页查询-->
<select id="queryDevTaskListPage" resultType="com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto"
parameterType="com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListReq">
select
t1.id as taskId,
t1.id as treeId,
t2.id as taskId,
t1.name as taskName,
t1.type,
t1.create_user_id as createUserId,
......@@ -158,32 +168,36 @@
t3.real_name as userName
from
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
where 1=1 and t1.type='01'
and t1.project_id = #{projectId}
<if test="treeId != null and treeId != ''"> and t1.id =#{treeId} </if>
<if test="taskId != null and taskId != ''"> and t2.id =#{taskId} </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>
</select>
<select id="findList" resultMap="DmpDevelopTaskResultMap">
SELECT
<include refid="FIND_ALL_COLUMN" />
FROM dmp_develop_task WHERE 1=1
<if test="taskType != null">AND task_type = #{taskType}</if>
<if test="type != null">AND type = #{type}</if>
<if test="scheduleType != null">AND schedule_type = #{scheduleType}</if>
<if test="isSubmit != null">AND is_submit = #{isSubmit}</if>
<if test="taskDesc != null">AND task_desc = #{taskDesc}</if>
<if test="script != null">AND script = #{script, jdbcType=BLOB,
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,
task.update_user_id,task.update_time,task.tree_id,task.flow_header,
task.flow_json, task.version,task.is_gziped
FROM dmp_develop_task task left join dmp_navigation_tree tree ON task.tree_id=tree.id
WHERE 1=1
<if test="taskType != null">AND task.task_type = #{taskType}</if>
<if test="type != null">AND task.type = #{type}</if>
<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>
<if test="dataStatus != null">AND data_status = #{dataStatus}</if>
<if test="treeId != null">AND tree_id = #{treeId}</if>
<if test="flowHeader != null">AND flow_header = #{flowHeader}</if>
<if test="flowJson != null">AND flow_json = #{flowJson}</if>
<if test="version != null">AND version = #{version}</if>
<if test="gziped != null">AND is_gziped = #{gziped}</if>
<if test="dataStatus != null">AND task.data_status = #{dataStatus}</if>
<if test="treeId != null">AND task.tree_id = #{treeId}</if>
<if test="flowHeader != null">AND task.flow_header = #{flowHeader}</if>
<if test="flowJson != null">AND task.flow_json = #{flowJson}</if>
<if test="version != null">AND task.version = #{version}</if>
<if test="gziped != null">AND task.is_gziped = #{gziped}</if>
<if test="projectId != null">AND tree.project_id = #{projectId}</if>
</select>
<select id="queryTaskTreeInfo" resultType="com.jz.dmp.modules.controller.dataOperation.bean.DataDevTaskListDto">
......@@ -193,7 +207,7 @@
(case when t1.type='01' then '离线同步' when t1.type='02' then '实时同步' when t1.type='03' then '数据开发' end) as type
from
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
where 1=1 and t1.type='01'
and t1.project_id = #{projectId}
......@@ -201,5 +215,10 @@
<if test="taskName != null and taskName != ''"> and t1.name like concat('%',#{taskName},'%') </if>
<if test="taskType != null and taskType!= ''"> and t1.type=#{taskType} </if>
</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>
\ 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