Your Name
2022-12-08 a20310f135ebf1c8ccff2b619f3eff3d704436a0
java110-db/src/main/resources/mapper/job/TaskServiceDaoImplMapper.xml
old mode 100644 new mode 100755
@@ -1,18 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="taskServiceDaoImpl">
    <!-- 保存定时任务信息 add by wuxw 2018-07-03 -->
    <insert id="saveBusinessTaskInfo" parameterType="Map">
        insert into business_task(
        operate,task_cron,create_time,task_name,state,b_id,template_id,task_id
        ) values (
        #{operate},#{taskCron},#{createTime},#{taskName},#{state},#{bId},#{templateId},#{taskId}
        )
        insert into business_task(operate, task_cron, task_name, state, b_id, template_id, task_id)
        values (#{operate}, #{taskCron}, #{taskName}, #{state}, #{bId}, #{templateId}, #{taskId})
    </insert>
    <!-- 查询定时任务信息(Business) add by wuxw 2018-07-03 -->
    <select id="getBusinessTaskInfo" parameterType="Map" resultType="Map">
@@ -44,9 +39,7 @@
        <if test="taskId !=null and taskId != ''">
            and t.task_id= #{taskId}
        </if>
    </select>
    <!-- 保存定时任务信息至 instance表中 add by wuxw 2018-07-03 -->
    <insert id="saveTaskInfoInstance" parameterType="Map">
@@ -76,17 +69,16 @@
        <if test="taskId !=null and taskId != ''">
            and t.task_id= #{taskId}
        </if>
    </insert>
    <!-- 查询定时任务信息 add by wuxw 2018-07-03 -->
    <select id="getTaskInfo" parameterType="Map" resultType="Map">
        select t.task_cron,t.task_cron taskCron,t.create_time,t.create_time createTime,t.task_name,t.task_name
        taskName,t.status_cd,t.status_cd statusCd,t.state,t.b_id,t.b_id bId,t.template_id,t.template_id
        templateId,t.task_id,t.task_id taskId
        from task t
        templateId,t.task_id,t.task_id taskId,tt.template_name templateName
        from task t,task_template tt
        where 1 =1
        and t.template_id = tt.template_Id
        <if test="taskCron !=null and taskCron != ''">
            and t.task_cron= #{taskCron}
        </if>
@@ -94,7 +86,7 @@
            and t.create_time= #{createTime}
        </if>
        <if test="taskName !=null and taskName != ''">
            and t.task_name= #{taskName}
            and t.task_name like '%${taskName}%'
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
@@ -108,6 +100,9 @@
        <if test="templateId !=null and templateId != ''">
            and t.template_id= #{templateId}
        </if>
        <if test="templateName != null and templateName != ''">
            and tt.template_name like '%${templateName}%'
        </if>
        <if test="taskId !=null and taskId != ''">
            and t.task_id= #{taskId}
        </if>
@@ -115,9 +110,7 @@
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
    </select>
    <!-- 修改定时任务信息 add by wuxw 2018-07-03 -->
    <update id="updateTaskInfoInstance" parameterType="Map">
@@ -127,9 +120,6 @@
        </if>
        <if test="taskCron !=null and taskCron != ''">
            , t.task_cron= #{taskCron}
        </if>
        <if test="createTime !=null and createTime != ''">
            , t.create_time= #{createTime}
        </if>
        <if test="taskName !=null and taskName != ''">
            , t.task_name= #{taskName}
@@ -147,14 +137,14 @@
        <if test="taskId !=null and taskId != ''">
            and t.task_id= #{taskId}
        </if>
    </update>
    <!-- 查询定时任务数量 add by wuxw 2018-07-03 -->
    <select id="queryTasksCount" parameterType="Map" resultType="Map">
        select count(1) count
        from task t
        from task t,task_template tt
        where 1 =1
        and t.template_id = tt.template_Id
        <if test="taskCron !=null and taskCron != ''">
            and t.task_cron= #{taskCron}
        </if>
@@ -162,7 +152,7 @@
            and t.create_time= #{createTime}
        </if>
        <if test="taskName !=null and taskName != ''">
            and t.task_name= #{taskName}
            and t.task_name like '%${taskName}%'
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
@@ -176,13 +166,13 @@
        <if test="templateId !=null and templateId != ''">
            and t.template_id= #{templateId}
        </if>
        <if test="templateName != null and templateName != ''">
            and tt.template_name like '%${templateName}%'
        </if>
        <if test="taskId !=null and taskId != ''">
            and t.task_id= #{taskId}
        </if>
    </select>
    <!-- 查询定时任务数量 add by wuxw 2018-07-03 -->
    <select id="queryTaskTemplateCount" parameterType="Map" resultType="Map">
@@ -201,13 +191,12 @@
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
    </select>
    <!-- 查询定时任务信息 add by wuxw 2018-07-03 -->
    <select id="getTaskInfo" parameterType="Map" resultType="Map">
        select t.template_id templateId,t.template_name templateName,t.template_desc templateDesc,t.create_time createTime,t.class_bean classBean
    <select id="getTaskTemplateInfo" parameterType="Map" resultType="Map">
        select t.template_id templateId,t.template_name templateName,t.template_desc templateDesc,t.create_time
        createTime,t.class_bean classBean
        from task_template t
        where 1 =1
        <if test="templateId !=null and templateId != ''">
@@ -226,9 +215,7 @@
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
    </select>
    <!-- 查询定时任务数量 add by wuxw 2018-07-03 -->
    <select id="queryTaskTemplateSpecCount" parameterType="Map" resultType="Map">
@@ -250,9 +237,7 @@
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
    </select>
    <!-- 查询定时任务信息 add by wuxw 2018-07-03 -->
    <select id="getTaskTemplateSpecInfo" parameterType="Map" resultType="Map">
@@ -275,8 +260,5 @@
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
    </select>
</mapper>