| | |
| | | <?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.pojoRm.UgRtuTask"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoUg.UgRtuTask"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table ug_rtu_task--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | |
| | | <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_over, deleted |
| | | id, program_id, creator, remark, dt, is_execute, is_over, deleted |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from ug_rtu_task |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from ug_rtu_task |
| | |
| | | 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 |
| | | <include refid="Base_Column_List" > |
| | | <property name="alias" value="bd"/> |
| | | </include> |
| | | </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"> |
| | |
| | | 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.pojoRm.UgRtuTask"> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoUg.UgRtuTask"> |
| | | <!--@mbg.generated--> |
| | | insert into ug_rtu_task (id, program_id, creator, |
| | | remark, dt, is_over, deleted |
| | | remark, dt, is_execute, is_over, deleted |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{programId,jdbcType=BIGINT}, #{creator,jdbcType=VARCHAR}, |
| | | #{remark,jdbcType=VARCHAR}, #{dt,jdbcType=TIMESTAMP}, #{isOver,jdbcType=TINYINT}, #{deleted,jdbcType=TINYINT} |
| | | #{remark,jdbcType=VARCHAR}, #{dt,jdbcType=TIMESTAMP}, #{isExecute,jdbcType=TINYINT}, |
| | | #{isOver,jdbcType=TINYINT}, #{deleted,jdbcType=TINYINT} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.UgRtuTask"> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoUg.UgRtuTask"> |
| | | <!--@mbg.generated--> |
| | | insert into ug_rtu_task |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | </if> |
| | | <if test="dt != null"> |
| | | dt, |
| | | </if> |
| | | <if test="isExecute != null"> |
| | | is_execute, |
| | | </if> |
| | | <if test="isOver != null"> |
| | | is_over, |
| | |
| | | <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> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.UgRtuTask"> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoUg.UgRtuTask"> |
| | | <!--@mbg.generated--> |
| | | update ug_rtu_task |
| | | <set> |
| | |
| | | <if test="dt != null"> |
| | | dt = #{dt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="isOver != null"> |
| | | <if test="isExecute != null"> |
| | | is_execute = #{isExecute,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="isOver != null"> |
| | | is_over = #{isOver,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="deleted != null"> |
| | |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.UgRtuTask"> |
| | | <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> |