BisInspWiuqhPubwtsDao.xml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  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.BisInspWiuqhPubwtsDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWiuqhPubwts" id="bisInspWiuqhPubwtsResultMap">
  5. <result property="isWiuSnd" column="IS_WIU_SND"/>
  6. <result property="intm" column="INTM"/>
  7. <result property="uptm" column="UPTM"/>
  8. <result property="dataStat" column="DATA_STAT"/>
  9. <result property="state" column="STATE"/>
  10. <result property="id" column="ID"/>
  11. <result property="rgstrId" column="RGSTR_ID"/>
  12. <result property="isWiuTm" column="IS_WIU_TM"/>
  13. <result property="isWiuPers" column="IS_WIU_PERS"/>
  14. <result property="isWiuLoc" column="IS_WIU_LOC"/>
  15. <result property="isWiuOvr" column="IS_WIU_OVR"/>
  16. <result property="isWiuBld" column="IS_WIU_BLD"/>
  17. </resultMap>
  18. <sql id="table_columns">
  19. IS_WIU_SND,
  20. INTM,
  21. UPTM,
  22. DATA_STAT,
  23. STATE,
  24. ID,
  25. RGSTR_ID,
  26. IS_WIU_TM,
  27. IS_WIU_PERS,
  28. IS_WIU_LOC,
  29. IS_WIU_OVR,
  30. IS_WIU_BLD
  31. </sql>
  32. <sql id="entity_properties">
  33. #{isWiuSnd},
  34. #{intm},
  35. #{uptm},
  36. #{dataStat},
  37. #{state},
  38. #{id},
  39. #{rgstrId},
  40. #{isWiuTm},
  41. #{isWiuPers},
  42. #{isWiuLoc},
  43. #{isWiuOvr},
  44. #{isWiuBld}
  45. </sql>
  46. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  47. <sql id="page_where">
  48. <trim prefix="where" prefixOverrides="and | or ">
  49. <if test="isWiuSnd != null and isWiuSnd != ''">
  50. and IS_WIU_SND = #{isWiuSnd}
  51. </if>
  52. <if test="intm != null">
  53. and INTM = #{intm}
  54. </if>
  55. <if test="uptm != null">
  56. and UPTM = #{uptm}
  57. </if>
  58. <if test="dataStat != null and dataStat != ''">
  59. and DATA_STAT = #{dataStat}
  60. </if>
  61. <if test="state != null and state != ''">
  62. and STATE = #{state}
  63. </if>
  64. <if test="rgstrId != null and rgstrId != ''">
  65. and RGSTR_ID = #{rgstrId}
  66. </if>
  67. <if test="isWiuTm != null and isWiuTm != ''">
  68. and IS_WIU_TM = #{isWiuTm}
  69. </if>
  70. <if test="isWiuPers != null and isWiuPers != ''">
  71. and IS_WIU_PERS = #{isWiuPers}
  72. </if>
  73. <if test="isWiuLoc != null and isWiuLoc != ''">
  74. and IS_WIU_LOC = #{isWiuLoc}
  75. </if>
  76. <if test="isWiuOvr != null and isWiuOvr != ''">
  77. and IS_WIU_OVR = #{isWiuOvr}
  78. </if>
  79. <if test="isWiuBld != null and isWiuBld != ''">
  80. and IS_WIU_BLD = #{isWiuBld}
  81. </if>
  82. and DATA_STAT='0'
  83. </trim>
  84. </sql>
  85. <select id="get" resultMap="bisInspWiuqhPubwtsResultMap" parameterType="String">
  86. select
  87. <include refid="table_columns"/>
  88. from BIS_INSP_WIUQH_PUBWTS where RGSTR_ID = #{id} and DATA_STAT='0'
  89. </select>
  90. <select id="getBy" resultMap="bisInspWiuqhPubwtsResultMap">
  91. select
  92. <include refid="table_columns"/>
  93. from BIS_INSP_WIUQH_PUBWTS
  94. <include refid="page_where"/>
  95. </select>
  96. <select id="findAll" resultMap="bisInspWiuqhPubwtsResultMap">
  97. select
  98. <include refid="table_columns"/>
  99. from BIS_INSP_WIUQH_PUBWTS
  100. </select>
  101. <select id="findList" resultMap="bisInspWiuqhPubwtsResultMap">
  102. select
  103. <include refid="table_columns"/>
  104. from BIS_INSP_WIUQH_PUBWTS
  105. <include refid="page_where"/>
  106. </select>
  107. <select id="selectCount" resultType="int">
  108. select count(ID) from BIS_INSP_WIUQH_PUBWTS
  109. <include refid="page_where"/>
  110. </select>
  111. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiuqhPubwts">
  112. insert into BIS_INSP_WIUQH_PUBWTS(
  113. <include refid="table_columns"/>
  114. )
  115. values (
  116. <include refid="entity_properties"/>
  117. )
  118. </insert>
  119. <delete id="delete" parameterType="java.lang.String">
  120. update BIS_INSP_WIUQH_PUBWTS set DATA_STAT='9' where ID = #{id}
  121. </delete>
  122. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiuqhPubwts">
  123. update BIS_INSP_WIUQH_PUBWTS set DATA_STAT='9'
  124. <include refid="page_where"/>
  125. </delete>
  126. <update id="deleteInFlag" parameterType="java.lang.String">
  127. update BIS_INSP_WIUQH_PUBWTS set DATA_STAT = '9' where ID = #{id}
  128. </update>
  129. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiuqhPubwts">
  130. update BIS_INSP_WIUQH_PUBWTS
  131. <trim prefix="set" suffixOverrides=",">
  132. <if test="isWiuSnd != null and isWiuSnd != ''">IS_WIU_SND
  133. = #{isWiuSnd},
  134. </if>
  135. <if test="intm != null">INTM
  136. = #{intm},
  137. </if>
  138. <if test="uptm != null">UPTM
  139. = #{uptm},
  140. </if>
  141. <if test="dataStat != null and dataStat != ''">DATA_STAT
  142. = #{dataStat},
  143. </if>
  144. <if test="state != null and state != ''">STATE
  145. = #{state},
  146. </if>
  147. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  148. = #{rgstrId},
  149. </if>
  150. <if test="isWiuTm != null and isWiuTm != ''">IS_WIU_TM
  151. = #{isWiuTm},
  152. </if>
  153. <if test="isWiuPers != null and isWiuPers != ''">IS_WIU_PERS
  154. = #{isWiuPers},
  155. </if>
  156. <if test="isWiuLoc != null and isWiuLoc != ''">IS_WIU_LOC
  157. = #{isWiuLoc},
  158. </if>
  159. <if test="isWiuOvr != null and isWiuOvr != ''">IS_WIU_OVR
  160. = #{isWiuOvr},
  161. </if>
  162. <if test="isWiuBld != null and isWiuBld != ''">IS_WIU_BLD
  163. = #{isWiuBld},
  164. </if>
  165. </trim>
  166. <where>ID = #{id}</where>
  167. </update>
  168. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiuqhPubwts">
  169. update BIS_INSP_WIUQH_PUBWTS
  170. <trim prefix="set" suffixOverrides=",">
  171. <if test="isWiuSnd != null and isWiuSnd != ''">IS_WIU_SND
  172. = #{isWiuSnd},
  173. </if>
  174. <if test="intm != null">INTM
  175. = #{intm},
  176. </if>
  177. <if test="uptm != null">UPTM
  178. = #{uptm},
  179. </if>
  180. <if test="dataStat != null and dataStat != ''">DATA_STAT
  181. = #{dataStat},
  182. </if>
  183. <if test="state != null and state != ''">STATE
  184. = #{state},
  185. </if>
  186. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  187. = #{rgstrId},
  188. </if>
  189. <if test="isWiuTm != null and isWiuTm != ''">IS_WIU_TM
  190. = #{isWiuTm},
  191. </if>
  192. <if test="isWiuPers != null and isWiuPers != ''">IS_WIU_PERS
  193. = #{isWiuPers},
  194. </if>
  195. <if test="isWiuLoc != null and isWiuLoc != ''">IS_WIU_LOC
  196. = #{isWiuLoc},
  197. </if>
  198. <if test="isWiuOvr != null and isWiuOvr != ''">IS_WIU_OVR
  199. = #{isWiuOvr},
  200. </if>
  201. <if test="isWiuBld != null and isWiuBld != ''">IS_WIU_BLD
  202. = #{isWiuBld},
  203. </if>
  204. </trim>
  205. <include refid="page_where"/>
  206. </update>
  207. <!-- 其他自定义SQL -->
  208. </mapper>