c3a8190dca91de299033b2e83cc9aa6d5a8d8151.svn-base 8.7 KB

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