12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?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.slibra.business.mapper.TXinyiPhosphorusMapper">
-
- <resultMap type="TXinyiPhosphorus" id="TXinyiPhosphorusResult">
- <result property="ID" column="ID" />
- <result property="testDate" column="TEST_DATE" />
- <result property="testTime" column="TEST_TIME" />
- <result property="ECC" column="ECC" />
- <result property="YHHL" column="YHHL" />
- <result property="EHHL" column="EHHL" />
- <result property="createdTime" column="CREATED_TIME" />
- </resultMap>
- <sql id="selectTXinyiPhosphorusVo">
- select ID, TEST_DATE, TEST_TIME, ECC, YHHL, EHHL, CREATED_TIME from t_xinyi_phosphorus
- </sql>
- <select id="selectTXinyiPhosphorusList" parameterType="TXinyiPhosphorus" resultMap="TXinyiPhosphorusResult">
- <include refid="selectTXinyiPhosphorusVo"/>
- <where>
- 1 = 1
- <if test="testDate != null and testDate != ''"> and TEST_DATE = #{testDate}</if>
- <if test="testTime != null and testTime != ''"> and TEST_TIME = #{testTime}</if>
- <if test="ECC != null "> and ECC = #{ECC}</if>
- <if test="YHHL != null "> and YHHL = #{YHHL}</if>
- <if test="EHHL != null "> and EHHL = #{EHHL}</if>
- <if test="createdTime != null "> and CREATED_TIME = #{createdTime}</if>
- </where>
- </select>
-
- <select id="selectTXinyiPhosphorusByID" parameterType="Long" resultMap="TXinyiPhosphorusResult">
- <include refid="selectTXinyiPhosphorusVo"/>
- where ID = #{ID}
- </select>
-
- <insert id="insertTXinyiPhosphorus" parameterType="TXinyiPhosphorus" useGeneratedKeys="true" keyProperty="ID">
- insert into t_xinyi_phosphorus
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="testDate != null">TEST_DATE,</if>
- <if test="testTime != null">TEST_TIME,</if>
- <if test="ECC != null">ECC,</if>
- <if test="YHHL != null">YHHL,</if>
- <if test="EHHL != null">EHHL,</if>
- <if test="createdTime != null">CREATED_TIME,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="testDate != null">#{testDate},</if>
- <if test="testTime != null">#{testTime},</if>
- <if test="ECC != null">#{ECC},</if>
- <if test="YHHL != null">#{YHHL},</if>
- <if test="EHHL != null">#{EHHL},</if>
- <if test="createdTime != null">#{createdTime},</if>
- </trim>
- </insert>
- <update id="updateTXinyiPhosphorus" parameterType="TXinyiPhosphorus">
- update t_xinyi_phosphorus
- <trim prefix="SET" suffixOverrides=",">
- <if test="testDate != null">TEST_DATE = #{testDate},</if>
- <if test="testTime != null">TEST_TIME = #{testTime},</if>
- <if test="ECC != null">ECC = #{ECC},</if>
- <if test="YHHL != null">YHHL = #{YHHL},</if>
- <if test="EHHL != null">EHHL = #{EHHL},</if>
- <if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
- </trim>
- ,revision = revision + 1
- where ID = #{ID}
- </update>
-
- <delete id="deleteTXinyiPhosphorusByID" parameterType="Long">
- update t_xinyi_phosphorus set del_flag = 2,revision = revision + 1 where del_flag = 0 and ID = #{ID}
- </delete>
- <delete id="deleteTXinyiPhosphorusByIDs" parameterType="String">
- update t_xinyi_phosphorus 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>
|