|
@@ -0,0 +1,89 @@
|
|
|
|
|
+<?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.ktg.iscs.mapper.IsCheckTaskMapper">
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="selectIsCheckTaskVo">
|
|
|
|
|
+ select * from is_check_task
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectIsCheckTaskList" parameterType="IsCheckTask" resultType="IsCheckTask">
|
|
|
|
|
+ <include refid="selectIsCheckTaskVo"/>
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="taskId != null "> and task_id = #{taskId}</if>
|
|
|
|
|
+ <if test="cabinetIdStr != null and cabinetIdStr != ''"> and cabinet_id_str = #{cabinetIdStr}</if>
|
|
|
|
|
+ <if test="userIdStr != null and userIdStr != ''"> and user_id_str = #{userIdStr}</if>
|
|
|
|
|
+ <if test="timeFrequency != null "> and time_frequency = #{timeFrequency}</if>
|
|
|
|
|
+ <if test="sendingTime != null and sendingTime != ''"> and sending_time = #{sendingTime}</if>
|
|
|
|
|
+ <if test="cron != null and cron != ''"> and cron = #{cron}</if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectIsCheckTaskByCheckId" parameterType="Long" resultType="IsCheckTask">
|
|
|
|
|
+ <include refid="selectIsCheckTaskVo"/>
|
|
|
|
|
+ where check_id = #{checkId}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <insert id="insertIsCheckTask" parameterType="IsCheckTask" useGeneratedKeys="true" keyProperty="checkId">
|
|
|
|
|
+ insert into is_check_task
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="taskId != null">task_id,</if>
|
|
|
|
|
+ <if test="cabinetIdStr != null">cabinet_id_str,</if>
|
|
|
|
|
+ <if test="userIdStr != null">user_id_str,</if>
|
|
|
|
|
+ <if test="timeFrequency != null">time_frequency,</if>
|
|
|
|
|
+ <if test="sendingTime != null">sending_time,</if>
|
|
|
|
|
+ <if test="cron != null">cron,</if>
|
|
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="taskId != null">#{taskId},</if>
|
|
|
|
|
+ <if test="cabinetIdStr != null">#{cabinetIdStr},</if>
|
|
|
|
|
+ <if test="userIdStr != null">#{userIdStr},</if>
|
|
|
|
|
+ <if test="timeFrequency != null">#{timeFrequency},</if>
|
|
|
|
|
+ <if test="sendingTime != null">#{sendingTime},</if>
|
|
|
|
|
+ <if test="cron != null">#{cron},</if>
|
|
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="updateIsCheckTask" parameterType="IsCheckTask">
|
|
|
|
|
+ update is_check_task
|
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
+ <if test="taskId != null">task_id = #{taskId},</if>
|
|
|
|
|
+ <if test="cabinetIdStr != null">cabinet_id_str = #{cabinetIdStr},</if>
|
|
|
|
|
+ <if test="userIdStr != null">user_id_str = #{userIdStr},</if>
|
|
|
|
|
+ <if test="timeFrequency != null">time_frequency = #{timeFrequency},</if>
|
|
|
|
|
+ <if test="sendingTime != null">sending_time = #{sendingTime},</if>
|
|
|
|
|
+ <if test="cron != null">cron = #{cron},</if>
|
|
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ where check_id = #{checkId}
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+ <delete id="deleteIsCheckTaskByCheckId" parameterType="Long">
|
|
|
|
|
+ delete from is_check_task where check_id = #{checkId}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+
|
|
|
|
|
+ <delete id="deleteIsCheckTaskByCheckIds" parameterType="String">
|
|
|
|
|
+ delete from is_check_task where check_id in
|
|
|
|
|
+ <foreach item="checkId" collection="array" open="(" separator="," close=")">
|
|
|
|
|
+ #{checkId}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </delete>
|
|
|
|
|
+</mapper>
|