AttWiuMeasDwtDao.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.com.goldenwater.dcproj.dao.AttWiuMeasDwtDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttWiuMeasDwt" id="attWiuMeasDwtResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="wiuId" column="WIU_ID"/>
  7. <result property="wwCond" column="WW_COND"/>
  8. <result property="wiustTp" column="WIUST_TP"/>
  9. <result property="wiustRunCond" column="WIUST_RUN_COND"/>
  10. <result property="wiuIsAtlonwms" column="WIU_IS_ATLONWMS"/>
  11. <result property="wainUse1" column="WAIN_USE1"/>
  12. <result property="wainUse2" column="WAIN_USE2"/>
  13. <result property="wainUse3" column="WAIN_USE3"/>
  14. <result property="wainUse4" column="WAIN_USE4"/>
  15. <result property="wainUse5" column="WAIN_USE5"/>
  16. <result property="inTm" column="IN_TM"/>
  17. <result property="upTm" column="UP_TM"/>
  18. </resultMap>
  19. <sql id="table_columns">
  20. ID,
  21. WIU_ID,
  22. WW_COND,
  23. WIUST_TP,
  24. WIUST_RUN_COND,
  25. WIU_IS_ATLONWMS,
  26. WAIN_USE1,
  27. WAIN_USE2,
  28. WAIN_USE3,
  29. WAIN_USE4,
  30. WAIN_USE5,
  31. IN_TM,
  32. UP_TM
  33. </sql>
  34. <sql id="entity_properties">
  35. #{id},
  36. #{wiuId},
  37. #{wwCond},
  38. #{wiustTp},
  39. #{wiustRunCond},
  40. #{wiuIsAtlonwms},
  41. #{wainUse1},
  42. #{wainUse2},
  43. #{wainUse3},
  44. #{wainUse4},
  45. #{wainUse5},
  46. #{inTm},
  47. #{upTm}
  48. </sql>
  49. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  50. <sql id="page_where">
  51. <trim prefix="where" prefixOverrides="and | or ">
  52. <if test="wiuId != null and wiuId != ''">and WIU_ID = #{wiuId}</if>
  53. <if test="wwCond != null and wwCond != ''">and WW_COND = #{wwCond}</if>
  54. <if test="wiustTp != null and wiustTp != ''">and WIUST_TP = #{wiustTp}</if>
  55. <if test="wiustRunCond != null and wiustRunCond != ''">and WIUST_RUN_COND = #{wiustRunCond}</if>
  56. <if test="wiuIsAtlonwms != null and wiuIsAtlonwms != ''">and WIU_IS_ATLONWMS = #{wiuIsAtlonwms}</if>
  57. <if test="wainUse1 != null and wainUse1 != ''">and WAIN_USE1 = #{wainUse1}</if>
  58. <if test="wainUse2 != null and wainUse2 != ''">and WAIN_USE2 = #{wainUse2}</if>
  59. <if test="wainUse3 != null and wainUse3 != ''">and WAIN_USE3 = #{wainUse3}</if>
  60. <if test="wainUse4 != null and wainUse4 != ''">and WAIN_USE4 = #{wainUse4}</if>
  61. <if test="wainUse5 != null and wainUse5 != ''">and WAIN_USE5 = #{wainUse5}</if>
  62. <if test="inTm != null">and IN_TM = #{inTm}</if>
  63. <if test="upTm != null">and UP_TM = #{upTm}</if>
  64. </trim>
  65. </sql>
  66. <select id="get" resultMap="attWiuMeasDwtResultMap" parameterType="String" >
  67. select <include refid="table_columns" /> from ATT_WIU_MEAS_DWT where ID = #{id}
  68. </select>
  69. <select id="getBy" resultMap="attWiuMeasDwtResultMap">
  70. select <include refid="table_columns" /> from ATT_WIU_MEAS_DWT <include refid="page_where" />
  71. </select>
  72. <select id="findAll" resultMap="attWiuMeasDwtResultMap">
  73. select <include refid="table_columns" /> from ATT_WIU_MEAS_DWT
  74. </select>
  75. <select id="findList" resultMap="attWiuMeasDwtResultMap">
  76. select <include refid="table_columns" /> from ATT_WIU_MEAS_DWT <include refid="page_where" />
  77. </select>
  78. <select id="selectCount" resultType="int" >
  79. select count(ID) from ATT_WIU_MEAS_DWT <include refid="page_where" />
  80. </select>
  81. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttWiuMeasDwt">
  82. insert into ATT_WIU_MEAS_DWT( <include refid="table_columns" /> )
  83. values ( <include refid="entity_properties" /> )
  84. </insert>
  85. <delete id="delete" parameterType="java.lang.String">
  86. delete from ATT_WIU_MEAS_DWT where ID = #{id}
  87. </delete>
  88. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttWiuMeasDwt">
  89. delete from ATT_WIU_MEAS_DWT <include refid="page_where" />
  90. </delete>
  91. <update id="deleteInFlag" parameterType="java.lang.String">
  92. update ATT_WIU_MEAS_DWT set flag_valid = 0 where ID = #{id}
  93. </update>
  94. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttWiuMeasDwt">
  95. update ATT_WIU_MEAS_DWT
  96. <trim prefix="set" suffixOverrides=",">
  97. <if test="wiuId != null and wiuId != ''">WIU_ID = #{wiuId},</if>
  98. <if test="wwCond != null and wwCond != ''">WW_COND = #{wwCond},</if>
  99. <if test="wiustTp != null and wiustTp != ''">WIUST_TP = #{wiustTp},</if>
  100. <if test="wiustRunCond != null and wiustRunCond != ''">WIUST_RUN_COND = #{wiustRunCond},</if>
  101. <if test="wiuIsAtlonwms != null and wiuIsAtlonwms != ''">WIU_IS_ATLONWMS = #{wiuIsAtlonwms},</if>
  102. <if test="wainUse1 != null and wainUse1 != ''">WAIN_USE1 = #{wainUse1},</if>
  103. <if test="wainUse2 != null and wainUse2 != ''">WAIN_USE2 = #{wainUse2},</if>
  104. <if test="wainUse3 != null and wainUse3 != ''">WAIN_USE3 = #{wainUse3},</if>
  105. <if test="wainUse4 != null and wainUse4 != ''">WAIN_USE4 = #{wainUse4},</if>
  106. <if test="wainUse5 != null and wainUse5 != ''">WAIN_USE5 = #{wainUse5},</if>
  107. <if test="inTm != null">IN_TM = #{inTm},</if>
  108. <if test="upTm != null">UP_TM = #{upTm},</if>
  109. </trim>
  110. <where>ID = #{id}</where>
  111. </update>
  112. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttWiuMeasDwt">
  113. update ATT_WIU_MEAS_DWT
  114. <trim prefix="set" suffixOverrides=",">
  115. <if test="wiuId != null and wiuId != ''">WIU_ID = #{wiuId},</if>
  116. <if test="wwCond != null and wwCond != ''">WW_COND = #{wwCond},</if>
  117. <if test="wiustTp != null and wiustTp != ''">WIUST_TP = #{wiustTp},</if>
  118. <if test="wiustRunCond != null and wiustRunCond != ''">WIUST_RUN_COND = #{wiustRunCond},</if>
  119. <if test="wiuIsAtlonwms != null and wiuIsAtlonwms != ''">WIU_IS_ATLONWMS = #{wiuIsAtlonwms},</if>
  120. <if test="wainUse1 != null and wainUse1 != ''">WAIN_USE1 = #{wainUse1},</if>
  121. <if test="wainUse2 != null and wainUse2 != ''">WAIN_USE2 = #{wainUse2},</if>
  122. <if test="wainUse3 != null and wainUse3 != ''">WAIN_USE3 = #{wainUse3},</if>
  123. <if test="wainUse4 != null and wainUse4 != ''">WAIN_USE4 = #{wainUse4},</if>
  124. <if test="wainUse5 != null and wainUse5 != ''">WAIN_USE5 = #{wainUse5},</if>
  125. <if test="inTm != null">IN_TM = #{inTm},</if>
  126. <if test="upTm != null">UP_TM = #{upTm},</if>
  127. </trim>
  128. <include refid="page_where" />
  129. </update>
  130. <!-- 其他自定义SQL -->
  131. </mapper>