BisInspWiuqhHyistDao.xml 9.8 KB

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