3a77b148e258e525bbcfc5f4f10fedd30e643466.svn-base 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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.BisInspRsvrBenefitsDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsvrBenefits" id="bisInspRsvrBenefitsResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="ifEffective" column="IF_EFFECTIVE"/>
  8. <result property="ifWaterS" column="IF_WATER_S"/>
  9. <result property="wsfdws" column="WSFDWS"/>
  10. <result property="diskRunInfo" column="DISK_RUN_INFO"/>
  11. <result property="hasSetMainFl" column="HAS_SET_MAIN_FL"/>
  12. <result property="recPersId" column="REC_PERS_ID"/>
  13. <result property="recPers2" column="REC_PERS2"/>
  14. <result property="recPersTel" column="REC_PERS_TEL"/>
  15. <result property="createTime" column="CREATE_TIME"/>
  16. <result property="updateTime" column="UPDATE_TIME"/>
  17. <result property="status" column="STATUS"/>
  18. <result property="otherNote" column="OTHER_NOTE"/>
  19. <result property="effvCas" column="EFFV_CAS"/>
  20. <result property="effvDesc" column="EFFV_DESC"/>
  21. <result property="isKwh" column="IS_KWH"/>
  22. <result property="kwh" column="KWH"/>
  23. <result property="wsfdwsPers" column="WSFDWS_PERS"/>
  24. </resultMap>
  25. <sql id="table_columns">
  26. ID,
  27. RGSTR_ID,
  28. IF_EFFECTIVE,
  29. IF_WATER_S,
  30. WSFDWS,
  31. DISK_RUN_INFO,
  32. HAS_SET_MAIN_FL,
  33. REC_PERS_ID,
  34. REC_PERS2,
  35. REC_PERS_TEL,
  36. CREATE_TIME,
  37. UPDATE_TIME,
  38. STATUS,
  39. OTHER_NOTE,
  40. EFFV_CAS,
  41. EFFV_DESC,
  42. IS_KWH,
  43. KWH,
  44. WSFDWS_PERS
  45. </sql>
  46. <sql id="entity_properties">
  47. #{id},
  48. #{rgstrId},
  49. #{ifEffective},
  50. #{ifWaterS},
  51. #{wsfdws},
  52. #{diskRunInfo},
  53. #{hasSetMainFl},
  54. #{recPersId},
  55. #{recPers2},
  56. #{recPersTel},
  57. #{createTime},
  58. #{updateTime},
  59. #{status},
  60. #{otherNote},
  61. #{effvCas},
  62. #{effvDesc},
  63. #{isKwh},
  64. #{kwh},
  65. #{wsfdwsPers}
  66. </sql>
  67. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  68. <sql id="page_where">
  69. <trim prefix="where" prefixOverrides="and | or ">
  70. <if test="effvDesc != null and effvDesc != ''">and EFFV_DESC = #{effvDesc}</if>
  71. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  72. <if test="ifEffective != null and ifEffective != ''">and IF_EFFECTIVE = #{ifEffective}</if>
  73. <if test="ifWaterS != null and ifWaterS != ''">and IF_WATER_S = #{ifWaterS}</if>
  74. <if test="wsfdws != null and wsfdws != ''">and WSFDWS = #{wsfdws}</if>
  75. <if test="diskRunInfo != null and diskRunInfo != ''">and DISK_RUN_INFO = #{diskRunInfo}</if>
  76. <if test="hasSetMainFl != null and hasSetMainFl != ''">and HAS_SET_MAIN_FL = #{hasSetMainFl}</if>
  77. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  78. <if test="recPers2 != null and recPers2 != ''">and REC_PERS2 = #{recPers2}</if>
  79. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  80. <if test="createTime != null">and CREATE_TIME = #{createTime}</if>
  81. <if test="updateTime != null">and UPDATE_TIME = #{updateTime}</if>
  82. <if test="status != null and status != ''">and STATUS = #{status}</if>
  83. <if test="otherNote != null and otherNote != ''">and OTHER_NOTE = #{otherNote}</if>
  84. <if test="effvCas != null and effvCas != ''">and EFFV_CAS = #{effvCas}</if>
  85. <if test="isKwh != null and isKwh != ''">and IS_KWH = #{isKwh}</if>
  86. <if test="kwh != null and kwh != ''">and KWH = #{kwh}</if>
  87. <if test="wsfdwsPers != null and wsfdwsPers != ''">and WSFDWS_PERS = #{wsfdwsPers}</if>
  88. </trim>
  89. </sql>
  90. <select id="get" resultMap="bisInspRsvrBenefitsResultMap" parameterType="String">
  91. select
  92. <include refid="table_columns"/>
  93. from BIS_INSP_RSVR_BENEFITS where ID = #{id}
  94. </select>
  95. <select id="getBy" resultMap="bisInspRsvrBenefitsResultMap">
  96. select
  97. <include refid="table_columns"/>
  98. from BIS_INSP_RSVR_BENEFITS
  99. <include refid="page_where"/>
  100. </select>
  101. <select id="findAll" resultMap="bisInspRsvrBenefitsResultMap">
  102. select
  103. <include refid="table_columns"/>
  104. from BIS_INSP_RSVR_BENEFITS
  105. </select>
  106. <select id="findList" resultMap="bisInspRsvrBenefitsResultMap">
  107. select
  108. <include refid="table_columns"/>
  109. from BIS_INSP_RSVR_BENEFITS
  110. <include refid="page_where"/>
  111. </select>
  112. <select id="selectCount" resultType="int">
  113. select count(ID) from BIS_INSP_RSVR_BENEFITS
  114. <include refid="page_where"/>
  115. </select>
  116. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrBenefits">
  117. insert into BIS_INSP_RSVR_BENEFITS(
  118. <include refid="table_columns"/>
  119. )
  120. values (
  121. <include refid="entity_properties"/>
  122. )
  123. </insert>
  124. <delete id="delete" parameterType="java.lang.String">
  125. delete from BIS_INSP_RSVR_BENEFITS where ID = #{id}
  126. </delete>
  127. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrBenefits">
  128. delete from BIS_INSP_RSVR_BENEFITS
  129. <include refid="page_where"/>
  130. </delete>
  131. <update id="deleteInFlag" parameterType="java.lang.String">
  132. update BIS_INSP_RSVR_BENEFITS set flag_valid = 0 where ID = #{id}
  133. </update>
  134. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrBenefits">
  135. update BIS_INSP_RSVR_BENEFITS
  136. <trim prefix="set" suffixOverrides=",">
  137. <if test="effvDesc != null and effvDesc != ''">EFFV_DESC = #{effvDesc},</if>
  138. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  139. <if test="ifEffective != null and ifEffective != ''">IF_EFFECTIVE = #{ifEffective},</if>
  140. <if test="ifWaterS != null and ifWaterS != ''">IF_WATER_S = #{ifWaterS},</if>
  141. <if test="wsfdws != null and wsfdws != ''">WSFDWS = #{wsfdws},</if>
  142. <if test="diskRunInfo != null and diskRunInfo != ''">DISK_RUN_INFO = #{diskRunInfo},</if>
  143. <if test="hasSetMainFl != null and hasSetMainFl != ''">HAS_SET_MAIN_FL = #{hasSetMainFl},</if>
  144. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  145. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  146. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  147. <if test="createTime != null">CREATE_TIME = #{createTime},</if>
  148. <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
  149. <if test="status != null and status != ''">STATUS = #{status},</if>
  150. <if test="otherNote != null and otherNote != ''">OTHER_NOTE = #{otherNote},</if>
  151. <if test="effvCas != null and effvCas != ''">EFFV_CAS = #{effvCas},</if>
  152. <if test="isKwh != null and isKwh != ''">IS_KWH = #{isKwh},</if>
  153. <if test="kwh != null and kwh != ''">KWH = #{kwh},</if>
  154. <if test="wsfdwsPers != null and wsfdwsPers != ''">WSFDWS_PERS = #{wsfdwsPers},</if>
  155. </trim>
  156. <where>ID = #{id}</where>
  157. </update>
  158. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrBenefits">
  159. update BIS_INSP_RSVR_BENEFITS
  160. <trim prefix="set" suffixOverrides=",">
  161. <if test="effvDesc != null and effvDesc != ''">EFFV_DESC = #{effvDesc},</if>
  162. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  163. <if test="ifEffective != null and ifEffective != ''">IF_EFFECTIVE = #{ifEffective},</if>
  164. <if test="ifWaterS != null and ifWaterS != ''">IF_WATER_S = #{ifWaterS},</if>
  165. <if test="wsfdws != null and wsfdws != ''">WSFDWS = #{wsfdws},</if>
  166. <if test="diskRunInfo != null and diskRunInfo != ''">DISK_RUN_INFO = #{diskRunInfo},</if>
  167. <if test="hasSetMainFl != null and hasSetMainFl != ''">HAS_SET_MAIN_FL = #{hasSetMainFl},</if>
  168. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  169. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  170. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  171. <if test="createTime != null">CREATE_TIME = #{createTime},</if>
  172. <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
  173. <if test="status != null and status != ''">STATUS = #{status},</if>
  174. <if test="otherNote != null and otherNote != ''">OTHER_NOTE = #{otherNote},</if>
  175. <if test="effvCas != null and effvCas != ''">EFFV_CAS = #{effvCas},</if>
  176. <if test="isKwh != null and isKwh != ''">IS_KWH = #{isKwh},</if>
  177. <if test="kwh != null and kwh != ''">KWH = #{kwh},</if>
  178. <if test="wsfdwsPers != null and wsfdwsPers != ''">WSFDWS_PERS = #{wsfdwsPers},</if>
  179. </trim>
  180. <include refid="page_where"/>
  181. </update>
  182. <!-- 其他自定义SQL -->
  183. </mapper>