| New file | 
 |  |  | 
 |  |  | <?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.dy.pipIrrGlobal.daoRm.UgRtuTaskMapper"> | 
 |  |  |   <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoUg.UgRtuTask"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     <!--@Table ug_rtu_task--> | 
 |  |  |     <id column="id" jdbcType="BIGINT" property="id" /> | 
 |  |  |     <result column="program_id" jdbcType="BIGINT" property="programId" /> | 
 |  |  |     <result column="creator" jdbcType="VARCHAR" property="creator" /> | 
 |  |  |     <result column="remark" jdbcType="VARCHAR" property="remark" /> | 
 |  |  |     <result column="dt" jdbcType="TIMESTAMP" property="dt" /> | 
 |  |  |     <result column="is_execute" jdbcType="TINYINT" property="isExecute" /> | 
 |  |  |     <result column="is_over" jdbcType="TINYINT" property="isOver" /> | 
 |  |  |     <result column="deleted" jdbcType="TINYINT" property="deleted" /> | 
 |  |  |   </resultMap> | 
 |  |  |   <sql id="Base_Column_List"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     id, program_id, creator, remark, dt, is_execute, is_over, deleted | 
 |  |  |   </sql> | 
 |  |  |   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     delete from ug_rtu_task | 
 |  |  |     where id = #{id,jdbcType=BIGINT} | 
 |  |  |   </delete> | 
 |  |  |   <delete id="deleteLogicById" parameterType="java.lang.Long"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     update ug_rtu_task set deleted = 1 | 
 |  |  |     where id = #{id,jdbcType=BIGINT} | 
 |  |  |   </delete> | 
 |  |  |  | 
 |  |  |   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     select  | 
 |  |  |     <include refid="Base_Column_List" />, | 
 |  |  |     (CASE WHEN is_execute = 1 THEN '是' ELSE '否' END) AS isExecuteStr, | 
 |  |  |     (CASE WHEN is_over = 1 THEN '是' ELSE '否' END) AS isOverStr | 
 |  |  |     from ug_rtu_task | 
 |  |  |     where id = #{id,jdbcType=BIGINT} | 
 |  |  |   </select> | 
 |  |  |  | 
 |  |  |   <select id="selectLastTask" parameterType="java.lang.Long" resultMap="BaseResultMap"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     select | 
 |  |  |     <include refid="Base_Column_List" /> | 
 |  |  |     from ug_rtu_task | 
 |  |  |     order by id desc limit 0, 1 | 
 |  |  |   </select> | 
 |  |  |  | 
 |  |  |   <select id="selectTotal" parameterType="java.util.Map" resultType="java.lang.Long"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     select | 
 |  |  |     count(*) | 
 |  |  |     from ug_rtu_task bd | 
 |  |  |     where bd.deleted != 1 | 
 |  |  |     <trim prefix="and" suffixOverrides="and"> | 
 |  |  |       <if test="programId != null and programId != ''"> | 
 |  |  |         bd.program_id = #{programId} and | 
 |  |  |       </if> | 
 |  |  |      <if test="creator != null and creator != ''"> | 
 |  |  |         bd.creator like concat('%', #{creator}, '%') and | 
 |  |  |       </if> | 
 |  |  |     </trim> | 
 |  |  |   </select> | 
 |  |  |   <select id="selectSome" parameterType="java.util.Map" resultMap="BaseResultMap"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     select | 
 |  |  |     <include refid="Base_Column_List" > | 
 |  |  |       <property name="alias" value="bd"/> | 
 |  |  |     </include>, | 
 |  |  |     (CASE WHEN bd.is_execute = 1 THEN '是' ELSE '否' END) AS isExecuteStr, | 
 |  |  |     (CASE WHEN bd.is_over = 1 THEN '是' ELSE '否' END) AS isOverStr | 
 |  |  |     from ug_rtu_task bd | 
 |  |  |     where bd.deleted != 1 | 
 |  |  |     <trim prefix="and" suffixOverrides="and"> | 
 |  |  |       <if test="programId != null and programId != ''"> | 
 |  |  |         bd.program_id = #{programId} and | 
 |  |  |       </if> | 
 |  |  |       <if test="creator != null and creator != ''"> | 
 |  |  |         bd.creator like concat('%', #{creator}, '%') and | 
 |  |  |       </if> | 
 |  |  |     </trim> | 
 |  |  |     order by bd.id DESC | 
 |  |  |     <trim prefix="limit " > | 
 |  |  |       <if test="start != null and count != null"> | 
 |  |  |         #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} | 
 |  |  |       </if> | 
 |  |  |     </trim> | 
 |  |  |   </select> | 
 |  |  |   <select id="selectAll" parameterType="java.util.Map" resultMap="BaseResultMap"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     select | 
 |  |  |     id, hex_file_name | 
 |  |  |     from ug_rtu_program bd | 
 |  |  |     where bd.deleted != 1 | 
 |  |  |     order by bd.id DESC | 
 |  |  |   </select> | 
 |  |  |  | 
 |  |  |   <select id="selectTaskDetail" parameterType="java.lang.Long" resultType="com.dy.pipIrrGlobal.voUg.VoUpgradeDetail"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     select | 
 |  |  |     ttb.id as taskId, | 
 |  |  |     ttb.creator as taskCreator, | 
 |  |  |     ttb.dt as taskDt, | 
 |  |  |     ptb.hex_file_name as hexFileName | 
 |  |  |     from ug_rtu_task ttb | 
 |  |  |     inner join ug_rtu_program ptb on ttb.program_id = ptb.id | 
 |  |  |     where ttb.id = #{taskId,jdbcType=BIGINT} | 
 |  |  |   </select> | 
 |  |  |  | 
 |  |  |   <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoUg.UgRtuTask"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     insert into ug_rtu_task (id, program_id, creator,  | 
 |  |  |       remark, dt, is_execute, is_over, deleted | 
 |  |  |       ) | 
 |  |  |     values (#{id,jdbcType=BIGINT}, #{programId,jdbcType=BIGINT}, #{creator,jdbcType=VARCHAR},  | 
 |  |  |       #{remark,jdbcType=VARCHAR}, #{dt,jdbcType=TIMESTAMP}, #{isExecute,jdbcType=TINYINT}, | 
 |  |  |       #{isOver,jdbcType=TINYINT}, #{deleted,jdbcType=TINYINT} | 
 |  |  |       ) | 
 |  |  |   </insert> | 
 |  |  |   <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoUg.UgRtuTask"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     insert into ug_rtu_task | 
 |  |  |     <trim prefix="(" suffix=")" suffixOverrides=","> | 
 |  |  |       <if test="id != null"> | 
 |  |  |         id, | 
 |  |  |       </if> | 
 |  |  |       <if test="programId != null"> | 
 |  |  |         program_id, | 
 |  |  |       </if> | 
 |  |  |       <if test="creator != null"> | 
 |  |  |         creator, | 
 |  |  |       </if> | 
 |  |  |       <if test="remark != null"> | 
 |  |  |         remark, | 
 |  |  |       </if> | 
 |  |  |       <if test="dt != null"> | 
 |  |  |         dt, | 
 |  |  |       </if> | 
 |  |  |       <if test="isExecute != null"> | 
 |  |  |         is_execute, | 
 |  |  |       </if> | 
 |  |  |       <if test="isOver != null"> | 
 |  |  |         is_over, | 
 |  |  |       </if> | 
 |  |  |      <if test="deleted != null"> | 
 |  |  |        deleted, | 
 |  |  |       </if> | 
 |  |  |     </trim> | 
 |  |  |     <trim prefix="values (" suffix=")" suffixOverrides=","> | 
 |  |  |       <if test="id != null"> | 
 |  |  |         #{id,jdbcType=BIGINT}, | 
 |  |  |       </if> | 
 |  |  |       <if test="programId != null"> | 
 |  |  |         #{programId,jdbcType=BIGINT}, | 
 |  |  |       </if> | 
 |  |  |       <if test="creator != null"> | 
 |  |  |         #{creator,jdbcType=VARCHAR}, | 
 |  |  |       </if> | 
 |  |  |       <if test="remark != null"> | 
 |  |  |         #{remark,jdbcType=VARCHAR}, | 
 |  |  |       </if> | 
 |  |  |       <if test="dt != null"> | 
 |  |  |         #{dt,jdbcType=TIMESTAMP}, | 
 |  |  |       </if> | 
 |  |  |       <if test="isExecute != null"> | 
 |  |  |         #{isExecute,jdbcType=TINYINT}, | 
 |  |  |       </if> | 
 |  |  |       <if test="isOver != null"> | 
 |  |  |         #{isOver,jdbcType=TINYINT}, | 
 |  |  |       </if> | 
 |  |  |      <if test="deleted != null"> | 
 |  |  |         #{deleted,jdbcType=TINYINT}, | 
 |  |  |       </if> | 
 |  |  |     </trim> | 
 |  |  |   </insert> | 
 |  |  |   <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoUg.UgRtuTask"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     update ug_rtu_task | 
 |  |  |     <set> | 
 |  |  |       <if test="programId != null"> | 
 |  |  |         program_id = #{programId,jdbcType=BIGINT}, | 
 |  |  |       </if> | 
 |  |  |       <if test="creator != null"> | 
 |  |  |         creator = #{creator,jdbcType=VARCHAR}, | 
 |  |  |       </if> | 
 |  |  |       <if test="remark != null"> | 
 |  |  |         remark = #{remark,jdbcType=VARCHAR}, | 
 |  |  |       </if> | 
 |  |  |       <if test="dt != null"> | 
 |  |  |         dt = #{dt,jdbcType=TIMESTAMP}, | 
 |  |  |       </if> | 
 |  |  |       <if test="isExecute != null"> | 
 |  |  |         is_execute = #{isExecute,jdbcType=TINYINT}, | 
 |  |  |       </if> | 
 |  |  |      <if test="isOver != null"> | 
 |  |  |         is_over = #{isOver,jdbcType=TINYINT}, | 
 |  |  |       </if> | 
 |  |  |       <if test="deleted != null"> | 
 |  |  |         deleted = #{deleted,jdbcType=TINYINT}, | 
 |  |  |       </if> | 
 |  |  |     </set> | 
 |  |  |     where id = #{id,jdbcType=BIGINT} | 
 |  |  |   </update> | 
 |  |  |   <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoUg.UgRtuTask"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     update ug_rtu_task | 
 |  |  |     set program_id = #{programId,jdbcType=BIGINT}, | 
 |  |  |       creator = #{creator,jdbcType=VARCHAR}, | 
 |  |  |       remark = #{remark,jdbcType=VARCHAR}, | 
 |  |  |       dt = #{dt,jdbcType=TIMESTAMP}, | 
 |  |  |       is_execute = #{isExecute,jdbcType=TINYINT}, | 
 |  |  |       is_over = #{isOver,jdbcType=TINYINT}, | 
 |  |  |       deleted = #{deleted,jdbcType=TINYINT} | 
 |  |  |     where id = #{id,jdbcType=BIGINT} | 
 |  |  |   </update> | 
 |  |  |  | 
 |  |  |   <update id="executeById" parameterType="java.lang.Long"> | 
 |  |  |     update ug_rtu_task set is_execute = 1 | 
 |  |  |     where id = #{id,jdbcType=BIGINT} | 
 |  |  |   </update> | 
 |  |  |  | 
 |  |  |   <update id="overById" parameterType="java.lang.Long"> | 
 |  |  |     update ug_rtu_task set is_over = 1 | 
 |  |  |     where id = #{id,jdbcType=BIGINT} | 
 |  |  |   </update> | 
 |  |  |  | 
 |  |  |   <select id="isExecuteById" parameterType="java.lang.Long" resultType="java.lang.Integer"> | 
 |  |  |     select | 
 |  |  |     is_execute | 
 |  |  |     from ug_rtu_task | 
 |  |  |     where id = #{id,jdbcType=BIGINT} | 
 |  |  |   </select> | 
 |  |  |  | 
 |  |  |   <select id="isOverById" parameterType="java.lang.Long" resultType="java.lang.Integer"> | 
 |  |  |     select | 
 |  |  |     is_over | 
 |  |  |     from ug_rtu_task | 
 |  |  |     where id = #{id,jdbcType=BIGINT} | 
 |  |  |   </select> | 
 |  |  |  | 
 |  |  | </mapper> |