BisInspVillgdWtspRunDao.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  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.BisInspVillgdWtspRunDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspVillgdWtspRun" id="bisInspVillgdWtspRunResultMap">
  5. <result property="isSetPhone" column="IS_SET_PHONE"/>
  6. <result property="isSati" column="IS_SATI"/>
  7. <result property="persId" column="PERS_ID"/>
  8. <result property="intm" column="INTM"/>
  9. <result property="uptm" column="UPTM"/>
  10. <result property="note" column="NOTE"/>
  11. <result property="dataStat" column="DATA_STAT"/>
  12. <result property="id" column="ID"/>
  13. <result property="wtspId" column="WTSP_ID"/>
  14. <result property="rgstrId" column="RGSTR_ID"/>
  15. <result property="isCllcIdea" column="IS_CLLC_IDEA"/>
  16. <result property="isSurePrice" column="IS_SURE_PRICE"/>
  17. <result property="isBalan" column="IS_BALAN"/>
  18. <result property="isSetSaft" column="IS_SET_SAFT"/>
  19. <result property="isFixLog" column="IS_FIX_LOG"/>
  20. <result property="isFindMend" column="IS_FIND_MEND"/>
  21. <result property="isSetFoam" column="IS_SET_FOAM"/>
  22. <result property="state" column="STATE"/>
  23. </resultMap>
  24. <sql id="table_columns">
  25. IS_SET_PHONE,
  26. IS_SATI,
  27. PERS_ID,
  28. INTM,
  29. UPTM,
  30. NOTE,
  31. DATA_STAT,
  32. ID,
  33. WTSP_ID,
  34. RGSTR_ID,
  35. IS_CLLC_IDEA,
  36. IS_SURE_PRICE,
  37. IS_BALAN,
  38. IS_SET_SAFT,
  39. IS_FIX_LOG,
  40. IS_FIND_MEND,
  41. IS_SET_FOAM,
  42. STATE
  43. </sql>
  44. <sql id="entity_properties">
  45. #{isSetPhone},
  46. #{isSati},
  47. #{persId},
  48. #{intm},
  49. #{uptm},
  50. #{note},
  51. #{dataStat},
  52. #{id},
  53. #{wtspId},
  54. #{rgstrId},
  55. #{isCllcIdea},
  56. #{isSurePrice},
  57. #{isBalan},
  58. #{isSetSaft},
  59. #{isFixLog},
  60. #{isFindMend},
  61. #{isSetFoam},
  62. #{state}
  63. </sql>
  64. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  65. <sql id="page_where">
  66. <trim prefix="where" prefixOverrides="and | or ">
  67. <if test="isSetPhone != null and isSetPhone != ''">
  68. and IS_SET_PHONE = #{isSetPhone}
  69. </if>
  70. <if test="isSati != null and isSati != ''">
  71. and IS_SATI = #{isSati}
  72. </if>
  73. <if test="persId != null and persId != ''">
  74. and PERS_ID = #{persId}
  75. </if>
  76. <if test="intm != null">
  77. and INTM = #{intm}
  78. </if>
  79. <if test="uptm != null">
  80. and UPTM = #{uptm}
  81. </if>
  82. <if test="note != null and note != ''">
  83. and NOTE = #{note}
  84. </if>
  85. <if test="dataStat != null and dataStat != ''">
  86. and DATA_STAT = #{dataStat}
  87. </if>
  88. <if test="wtspId != null and wtspId != ''">
  89. and WTSP_ID = #{wtspId}
  90. </if>
  91. <if test="rgstrId != null and rgstrId != ''">
  92. and RGSTR_ID = #{rgstrId}
  93. </if>
  94. <if test="isCllcIdea != null and isCllcIdea != ''">
  95. and IS_CLLC_IDEA = #{isCllcIdea}
  96. </if>
  97. <if test="isSurePrice != null and isSurePrice != ''">
  98. and IS_SURE_PRICE = #{isSurePrice}
  99. </if>
  100. <if test="isBalan != null and isBalan != ''">
  101. and IS_BALAN = #{isBalan}
  102. </if>
  103. <if test="isSetSaft != null and isSetSaft != ''">
  104. and IS_SET_SAFT = #{isSetSaft}
  105. </if>
  106. <if test="isFixLog != null and isFixLog != ''">
  107. and IS_FIX_LOG = #{isFixLog}
  108. </if>
  109. <if test="isFindMend != null and isFindMend != ''">
  110. and IS_FIND_MEND = #{isFindMend}
  111. </if>
  112. <if test="isSetFoam != null and isSetFoam != ''">
  113. and IS_SET_FOAM = #{isSetFoam}
  114. </if>
  115. <if test="state != null and state != ''">
  116. and STATE = #{state}
  117. </if>
  118. and DATA_STAT='0'
  119. </trim>
  120. </sql>
  121. <select id="get" resultMap="bisInspVillgdWtspRunResultMap" parameterType="String">
  122. select
  123. <include refid="table_columns"/>
  124. from BIS_INSP_VILLGD_WTSP_RUN where WTSP_ID = #{id}
  125. </select>
  126. <select id="getBy" resultMap="bisInspVillgdWtspRunResultMap">
  127. select
  128. <include refid="table_columns"/>
  129. from BIS_INSP_VILLGD_WTSP_RUN
  130. <include refid="page_where"/>
  131. </select>
  132. <select id="findAll" resultMap="bisInspVillgdWtspRunResultMap">
  133. select
  134. <include refid="table_columns"/>
  135. from BIS_INSP_VILLGD_WTSP_RUN
  136. </select>
  137. <select id="findList" resultMap="bisInspVillgdWtspRunResultMap">
  138. select
  139. <include refid="table_columns"/>
  140. from BIS_INSP_VILLGD_WTSP_RUN
  141. <include refid="page_where"/>
  142. </select>
  143. <select id="selectCount" resultType="int">
  144. select count(ID) from BIS_INSP_VILLGD_WTSP_RUN
  145. <include refid="page_where"/>
  146. </select>
  147. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspVillgdWtspRun">
  148. insert into BIS_INSP_VILLGD_WTSP_RUN(
  149. <include refid="table_columns"/>
  150. )
  151. values (
  152. <include refid="entity_properties"/>
  153. )
  154. </insert>
  155. <delete id="delete" parameterType="java.lang.String">
  156. update BIS_INSP_VILLGD_WTSP_RUN set DATA_STAT='9' where ID = #{id}
  157. </delete>
  158. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspVillgdWtspRun">
  159. update BIS_INSP_VILLGD_WTSP_RUN set DATA_STAT='9'
  160. <include refid="page_where"/>
  161. </delete>
  162. <update id="deleteInFlag" parameterType="java.lang.String">
  163. update BIS_INSP_VILLGD_WTSP_RUN set DATA_STAT = '9' where ID = #{id}
  164. </update>
  165. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspVillgdWtspRun">
  166. update BIS_INSP_VILLGD_WTSP_RUN
  167. <trim prefix="set" suffixOverrides=",">
  168. <if test="isSetPhone != null and isSetPhone != ''">IS_SET_PHONE
  169. = #{isSetPhone},
  170. </if>
  171. <if test="isSati != null and isSati != ''">IS_SATI
  172. = #{isSati},
  173. </if>
  174. <if test="persId != null and persId != ''">PERS_ID
  175. = #{persId},
  176. </if>
  177. <if test="intm != null">INTM
  178. = #{intm},
  179. </if>
  180. <if test="uptm != null">UPTM
  181. = #{uptm},
  182. </if>
  183. <if test="note != null and note != ''">NOTE
  184. = #{note},
  185. </if>
  186. <if test="dataStat != null and dataStat != ''">DATA_STAT
  187. = #{dataStat},
  188. </if>
  189. <if test="wtspId != null and wtspId != ''">WTSP_ID
  190. = #{wtspId},
  191. </if>
  192. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  193. = #{rgstrId},
  194. </if>
  195. <if test="isCllcIdea != null and isCllcIdea != ''">IS_CLLC_IDEA
  196. = #{isCllcIdea},
  197. </if>
  198. <if test="isSurePrice != null and isSurePrice != ''">IS_SURE_PRICE
  199. = #{isSurePrice},
  200. </if>
  201. <if test="isBalan != null and isBalan != ''">IS_BALAN
  202. = #{isBalan},
  203. </if>
  204. <if test="isSetSaft != null and isSetSaft != ''">IS_SET_SAFT
  205. = #{isSetSaft},
  206. </if>
  207. <if test="isFixLog != null and isFixLog != ''">IS_FIX_LOG
  208. = #{isFixLog},
  209. </if>
  210. <if test="isFindMend != null and isFindMend != ''">IS_FIND_MEND
  211. = #{isFindMend},
  212. </if>
  213. <if test="isSetFoam != null and isSetFoam != ''">IS_SET_FOAM
  214. = #{isSetFoam},
  215. </if>
  216. <if test="state != null and state != ''">
  217. STATE = #{state},
  218. </if>
  219. </trim>
  220. <where>ID = #{id}</where>
  221. </update>
  222. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspVillgdWtspRun">
  223. update BIS_INSP_VILLGD_WTSP_RUN
  224. <trim prefix="set" suffixOverrides=",">
  225. <if test="isSetPhone != null and isSetPhone != ''">IS_SET_PHONE
  226. = #{isSetPhone},
  227. </if>
  228. <if test="isSati != null and isSati != ''">IS_SATI
  229. = #{isSati},
  230. </if>
  231. <if test="persId != null and persId != ''">PERS_ID
  232. = #{persId},
  233. </if>
  234. <if test="intm != null">INTM
  235. = #{intm},
  236. </if>
  237. <if test="uptm != null">UPTM
  238. = #{uptm},
  239. </if>
  240. <if test="note != null and note != ''">NOTE
  241. = #{note},
  242. </if>
  243. <if test="dataStat != null and dataStat != ''">DATA_STAT
  244. = #{dataStat},
  245. </if>
  246. <if test="wtspId != null and wtspId != ''">WTSP_ID
  247. = #{wtspId},
  248. </if>
  249. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  250. = #{rgstrId},
  251. </if>
  252. <if test="isCllcIdea != null and isCllcIdea != ''">IS_CLLC_IDEA
  253. = #{isCllcIdea},
  254. </if>
  255. <if test="isSurePrice != null and isSurePrice != ''">IS_SURE_PRICE
  256. = #{isSurePrice},
  257. </if>
  258. <if test="isBalan != null and isBalan != ''">IS_BALAN
  259. = #{isBalan},
  260. </if>
  261. <if test="isSetSaft != null and isSetSaft != ''">IS_SET_SAFT
  262. = #{isSetSaft},
  263. </if>
  264. <if test="isFixLog != null and isFixLog != ''">IS_FIX_LOG
  265. = #{isFixLog},
  266. </if>
  267. <if test="isFindMend != null and isFindMend != ''">IS_FIND_MEND
  268. = #{isFindMend},
  269. </if>
  270. <if test="isSetFoam != null and isSetFoam != ''">IS_SET_FOAM
  271. = #{isSetFoam},
  272. </if>
  273. <if test="state != null and state != ''">
  274. STATE = #{state},
  275. </if>
  276. </trim>
  277. <include refid="page_where"/>
  278. </update>
  279. <!-- 其他自定义SQL -->
  280. </mapper>