12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?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.xlht.xlhtproject.mapper.TTbDuMapper">
-
- <resultMap type="TTbDu" id="TTbDuResult">
- <result property="ID" column="ID" />
- <result property="c1TjLl" column="C1_TJ_LL" />
- <result property="c1TjLlTime" column="C1_TJ_LL_TIME" />
- <result property="c2TjLl" column="C2_TJ_LL" />
- <result property="c2TjLlTime" column="C2_TJ_LL_TIME" />
- <result property="ACTIVE" column="ACTIVE" />
- </resultMap>
- <sql id="selectTTbDuVo">
- select ID, C1_TJ_LL, C1_TJ_LL_TIME, C2_TJ_LL, C2_TJ_LL_TIME, ACTIVE from T_tb_du
- </sql>
- <select id="selectTTbDuList" parameterType="TTbDu" resultMap="TTbDuResult">
- <include refid="selectTTbDuVo"/>
- <where>
- 1 = 1
- <if test="c1TjLl != null "> and C1_TJ_LL = #{c1TjLl}</if>
- <if test="c1TjLlTime != null and c1TjLlTime != ''"> and C1_TJ_LL_TIME = #{c1TjLlTime}</if>
- <if test="c2TjLl != null "> and C2_TJ_LL = #{c2TjLl}</if>
- <if test="c2TjLlTime != null and c2TjLlTime != ''"> and C2_TJ_LL_TIME = #{c2TjLlTime}</if>
- <if test="ACTIVE != null "> and ACTIVE = #{ACTIVE}</if>
- </where>
- order by id desc
- </select>
-
- <select id="selectTTbDuByID" parameterType="Long" resultMap="TTbDuResult">
- <include refid="selectTTbDuVo"/>
- where ID = #{ID}
- </select>
-
- <insert id="insertTTbDu" parameterType="TTbDu">
- insert into T_tb_du
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="ID != null">ID,</if>
- <if test="c1TjLl != null">C1_TJ_LL,</if>
- <if test="c1TjLlTime != null">C1_TJ_LL_TIME,</if>
- <if test="c2TjLl != null">C2_TJ_LL,</if>
- <if test="c2TjLlTime != null">C2_TJ_LL_TIME,</if>
- <if test="ACTIVE != null">ACTIVE,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="ID != null">#{ID},</if>
- <if test="c1TjLl != null">#{c1TjLl},</if>
- <if test="c1TjLlTime != null">#{c1TjLlTime},</if>
- <if test="c2TjLl != null">#{c2TjLl},</if>
- <if test="c2TjLlTime != null">#{c2TjLlTime},</if>
- <if test="ACTIVE != null">#{ACTIVE},</if>
- </trim>
- </insert>
- <update id="updateTTbDu" parameterType="TTbDu">
- update T_tb_du
- <trim prefix="SET" suffixOverrides=",">
- <if test="c1TjLl != null">C1_TJ_LL = #{c1TjLl},</if>
- <if test="c1TjLlTime != null">C1_TJ_LL_TIME = #{c1TjLlTime},</if>
- <if test="c2TjLl != null">C2_TJ_LL = #{c2TjLl},</if>
- <if test="c2TjLlTime != null">C2_TJ_LL_TIME = #{c2TjLlTime},</if>
- <if test="ACTIVE != null">ACTIVE = #{ACTIVE},</if>
- </trim>
- where ID = #{ID}
- </update>
-
- <delete id="deleteTTbDuByID" parameterType="Long">
- update T_tb_du set del_flag = 2,revision = revision + 1 where del_flag = 0 and ID = #{ID}
- </delete>
- <delete id="deleteTTbDuByIDs" parameterType="String">
- update T_tb_du set del_flag = 2,revision = revision + 1 where del_flag = 0 and ID in
- <foreach item="ID" collection="array" open="(" separator="," close=")">
- #{ID}
- </foreach>
- </delete>
- </mapper>
|