| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <?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="cn.com.goldenwater.dcproj.dao.AttWiuMeasDwtDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttWiuMeasDwt" id="attWiuMeasDwtResultMap">
- <result property="id" column="ID"/>
- <result property="wiuId" column="WIU_ID"/>
- <result property="wwCond" column="WW_COND"/>
- <result property="wiustTp" column="WIUST_TP"/>
- <result property="wiustRunCond" column="WIUST_RUN_COND"/>
- <result property="wiuIsAtlonwms" column="WIU_IS_ATLONWMS"/>
- <result property="wainUse1" column="WAIN_USE1"/>
- <result property="wainUse2" column="WAIN_USE2"/>
- <result property="wainUse3" column="WAIN_USE3"/>
- <result property="wainUse4" column="WAIN_USE4"/>
- <result property="wainUse5" column="WAIN_USE5"/>
- <result property="inTm" column="IN_TM"/>
- <result property="upTm" column="UP_TM"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- WIU_ID,
- WW_COND,
- WIUST_TP,
- WIUST_RUN_COND,
- WIU_IS_ATLONWMS,
- WAIN_USE1,
- WAIN_USE2,
- WAIN_USE3,
- WAIN_USE4,
- WAIN_USE5,
- IN_TM,
- UP_TM
- </sql>
- <sql id="entity_properties">
- #{id},
- #{wiuId},
- #{wwCond},
- #{wiustTp},
- #{wiustRunCond},
- #{wiuIsAtlonwms},
- #{wainUse1},
- #{wainUse2},
- #{wainUse3},
- #{wainUse4},
- #{wainUse5},
- #{inTm},
- #{upTm}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="wiuId != null and wiuId != ''">and WIU_ID = #{wiuId}</if>
- <if test="wwCond != null and wwCond != ''">and WW_COND = #{wwCond}</if>
- <if test="wiustTp != null and wiustTp != ''">and WIUST_TP = #{wiustTp}</if>
- <if test="wiustRunCond != null and wiustRunCond != ''">and WIUST_RUN_COND = #{wiustRunCond}</if>
- <if test="wiuIsAtlonwms != null and wiuIsAtlonwms != ''">and WIU_IS_ATLONWMS = #{wiuIsAtlonwms}</if>
- <if test="wainUse1 != null and wainUse1 != ''">and WAIN_USE1 = #{wainUse1}</if>
- <if test="wainUse2 != null and wainUse2 != ''">and WAIN_USE2 = #{wainUse2}</if>
- <if test="wainUse3 != null and wainUse3 != ''">and WAIN_USE3 = #{wainUse3}</if>
- <if test="wainUse4 != null and wainUse4 != ''">and WAIN_USE4 = #{wainUse4}</if>
- <if test="wainUse5 != null and wainUse5 != ''">and WAIN_USE5 = #{wainUse5}</if>
- <if test="inTm != null">and IN_TM = #{inTm}</if>
- <if test="upTm != null">and UP_TM = #{upTm}</if>
- </trim>
- </sql>
- <select id="get" resultMap="attWiuMeasDwtResultMap" parameterType="String" >
- select <include refid="table_columns" /> from ATT_WIU_MEAS_DWT where ID = #{id}
- </select>
- <select id="getBy" resultMap="attWiuMeasDwtResultMap">
- select <include refid="table_columns" /> from ATT_WIU_MEAS_DWT <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="attWiuMeasDwtResultMap">
- select <include refid="table_columns" /> from ATT_WIU_MEAS_DWT
- </select>
- <select id="findList" resultMap="attWiuMeasDwtResultMap">
- select <include refid="table_columns" /> from ATT_WIU_MEAS_DWT <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from ATT_WIU_MEAS_DWT <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttWiuMeasDwt">
- insert into ATT_WIU_MEAS_DWT( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from ATT_WIU_MEAS_DWT where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttWiuMeasDwt">
- delete from ATT_WIU_MEAS_DWT <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ATT_WIU_MEAS_DWT set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttWiuMeasDwt">
- update ATT_WIU_MEAS_DWT
- <trim prefix="set" suffixOverrides=",">
- <if test="wiuId != null and wiuId != ''">WIU_ID = #{wiuId},</if>
- <if test="wwCond != null and wwCond != ''">WW_COND = #{wwCond},</if>
- <if test="wiustTp != null and wiustTp != ''">WIUST_TP = #{wiustTp},</if>
- <if test="wiustRunCond != null and wiustRunCond != ''">WIUST_RUN_COND = #{wiustRunCond},</if>
- <if test="wiuIsAtlonwms != null and wiuIsAtlonwms != ''">WIU_IS_ATLONWMS = #{wiuIsAtlonwms},</if>
- <if test="wainUse1 != null and wainUse1 != ''">WAIN_USE1 = #{wainUse1},</if>
- <if test="wainUse2 != null and wainUse2 != ''">WAIN_USE2 = #{wainUse2},</if>
- <if test="wainUse3 != null and wainUse3 != ''">WAIN_USE3 = #{wainUse3},</if>
- <if test="wainUse4 != null and wainUse4 != ''">WAIN_USE4 = #{wainUse4},</if>
- <if test="wainUse5 != null and wainUse5 != ''">WAIN_USE5 = #{wainUse5},</if>
- <if test="inTm != null">IN_TM = #{inTm},</if>
- <if test="upTm != null">UP_TM = #{upTm},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttWiuMeasDwt">
- update ATT_WIU_MEAS_DWT
- <trim prefix="set" suffixOverrides=",">
- <if test="wiuId != null and wiuId != ''">WIU_ID = #{wiuId},</if>
- <if test="wwCond != null and wwCond != ''">WW_COND = #{wwCond},</if>
- <if test="wiustTp != null and wiustTp != ''">WIUST_TP = #{wiustTp},</if>
- <if test="wiustRunCond != null and wiustRunCond != ''">WIUST_RUN_COND = #{wiustRunCond},</if>
- <if test="wiuIsAtlonwms != null and wiuIsAtlonwms != ''">WIU_IS_ATLONWMS = #{wiuIsAtlonwms},</if>
- <if test="wainUse1 != null and wainUse1 != ''">WAIN_USE1 = #{wainUse1},</if>
- <if test="wainUse2 != null and wainUse2 != ''">WAIN_USE2 = #{wainUse2},</if>
- <if test="wainUse3 != null and wainUse3 != ''">WAIN_USE3 = #{wainUse3},</if>
- <if test="wainUse4 != null and wainUse4 != ''">WAIN_USE4 = #{wainUse4},</if>
- <if test="wainUse5 != null and wainUse5 != ''">WAIN_USE5 = #{wainUse5},</if>
- <if test="inTm != null">IN_TM = #{inTm},</if>
- <if test="upTm != null">UP_TM = #{upTm},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|