BisInspVillgdVillDao.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  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.BisInspVillgdVillDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspVillgdVill" id="bisInspVillgdVillResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="nm" column="NM"/>
  8. <result property="loc" column="LOC"/>
  9. <result property="isPov" column="IS_POV"/>
  10. <result property="isMin" column="IS_MIN"/>
  11. <result property="isOver" column="IS_OVER"/>
  12. <result property="othNote" column="OTH_NOTE"/>
  13. <result property="tm" column="TM"/>
  14. <result property="isInHome" column="IS_IN_HOME"/>
  15. <result property="total" column="TOTAL"/>
  16. <result property="inTotal" column="IN_TOTAL"/>
  17. <result property="inRate" column="IN_RATE"/>
  18. <result property="isTari" column="IS_TARI"/>
  19. <result property="tariMet" column="TARI_MET"/>
  20. <result property="tariMon" column="TARI_MON"/>
  21. <result property="isPayCost" column="IS_PAY_COST"/>
  22. <result property="isWaterSupply" column="IS_WATER_SUPPLY"/>
  23. <result property="supplyPblm" column="SUPPLY_PBLM"/>
  24. <result property="supplyNote" column="SUPPLY_NOTE"/>
  25. <result property="persId" column="PERS_ID"/>
  26. <result property="intm" column="INTM"/>
  27. <result property="uptm" column="UPTM"/>
  28. <result property="note" column="NOTE"/>
  29. <result property="dataStat" column="DATA_STAT"/>
  30. </resultMap>
  31. <sql id="table_columns">
  32. ID,
  33. RGSTR_ID,
  34. NM,
  35. LOC,
  36. IS_POV,
  37. IS_MIN,
  38. IS_OVER,
  39. OTH_NOTE,
  40. TM,
  41. IS_IN_HOME,
  42. TOTAL,
  43. IN_TOTAL,
  44. IN_RATE,
  45. IS_TARI,
  46. TARI_MET,
  47. TARI_MON,
  48. IS_PAY_COST,
  49. IS_WATER_SUPPLY,
  50. SUPPLY_PBLM,
  51. SUPPLY_NOTE,
  52. PERS_ID,
  53. INTM,
  54. UPTM,
  55. NOTE,
  56. DATA_STAT
  57. </sql>
  58. <sql id="entity_properties">
  59. #{id},
  60. #{rgstrId},
  61. #{nm},
  62. #{loc},
  63. #{isPov},
  64. #{isMin},
  65. #{isOver},
  66. #{othNote},
  67. #{tm},
  68. #{isInHome},
  69. #{total},
  70. #{inTotal},
  71. #{inRate},
  72. #{isTari},
  73. #{tariMet},
  74. #{tariMon},
  75. #{isPayCost},
  76. #{isWaterSupply},
  77. #{supplyPblm},
  78. #{supplyNote},
  79. #{persId},
  80. #{intm},
  81. #{uptm},
  82. #{note},
  83. #{dataStat}
  84. </sql>
  85. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  86. <sql id="page_where">
  87. <trim prefix="where" prefixOverrides="and | or ">
  88. <if test="rgstrId != null and rgstrId != ''">
  89. and RGSTR_ID = #{rgstrId}
  90. </if>
  91. <if test="nm != null and nm != ''">
  92. and NM = #{nm}
  93. </if>
  94. <if test="loc != null and loc != ''">
  95. and LOC = #{loc}
  96. </if>
  97. <if test="isPov != null and isPov != ''">
  98. and IS_POV = #{isPov}
  99. </if>
  100. <if test="isMin != null and isMin != ''">
  101. and IS_MIN = #{isMin}
  102. </if>
  103. <if test="isOver != null and isOver != ''">
  104. and IS_OVER = #{isOver}
  105. </if>
  106. <if test="othNote != null and othNote != ''">
  107. and OTH_NOTE = #{othNote}
  108. </if>
  109. <if test="tm != null">
  110. and TM = #{tm}
  111. </if>
  112. <if test="isInHome != null and isInHome != ''">
  113. and IS_IN_HOME = #{isInHome}
  114. </if>
  115. <if test="total != null and total != ''">
  116. and TOTAL = #{total}
  117. </if>
  118. <if test="inTotal != null and inTotal != ''">
  119. and IN_TOTAL = #{inTotal}
  120. </if>
  121. <if test="inRate != null and inRate != ''">
  122. and IN_RATE = #{inRate}
  123. </if>
  124. <if test="isTari != null and isTari != ''">
  125. and IS_TARI = #{isTari}
  126. </if>
  127. <if test="tariMet != null and tariMet != ''">
  128. and TARI_MET = #{tariMet}
  129. </if>
  130. <if test="tariMon != null and tariMon != ''">
  131. and TARI_MON = #{tariMon}
  132. </if>
  133. <if test="isPayCost != null and isPayCost != ''">
  134. and IS_PAY_COST = #{isPayCost}
  135. </if>
  136. <if test="isWaterSupply != null and isWaterSupply != ''">
  137. and IS_WATER_SUPPLY = #{isWaterSupply}
  138. </if>
  139. <if test="supplyPblm != null and supplyPblm != ''">
  140. and SUPPLY_PBLM = #{supplyPblm}
  141. </if>
  142. <if test="supplyNote != null and supplyNote != ''">
  143. and SUPPLY_NOTE = #{supplyNote}
  144. </if>
  145. <if test="persId != null and persId != ''">
  146. and PERS_ID = #{persId}
  147. </if>
  148. <if test="intm != null">
  149. and INTM = #{intm}
  150. </if>
  151. <if test="uptm != null">
  152. and UPTM = #{uptm}
  153. </if>
  154. <if test="note != null and note != ''">
  155. and NOTE = #{note}
  156. </if>
  157. <if test="dataStat != null and dataStat != ''">
  158. and DATA_STAT = #{dataStat}
  159. </if>
  160. and DATA_STAT='0'
  161. </trim>
  162. </sql>
  163. <select id="get" resultMap="bisInspVillgdVillResultMap" parameterType="String">
  164. select
  165. <include refid="table_columns"/>
  166. from BIS_INSP_VILLGD_VILL where ID = #{id}
  167. </select>
  168. <select id="getBy" resultMap="bisInspVillgdVillResultMap">
  169. select
  170. <include refid="table_columns"/>
  171. from BIS_INSP_VILLGD_VILL
  172. <include refid="page_where"/>
  173. </select>
  174. <select id="findAll" resultMap="bisInspVillgdVillResultMap">
  175. select
  176. <include refid="table_columns"/>
  177. from BIS_INSP_VILLGD_VILL
  178. </select>
  179. <select id="findList" resultMap="bisInspVillgdVillResultMap">
  180. select
  181. <include refid="table_columns"/>
  182. from BIS_INSP_VILLGD_VILL
  183. <include refid="page_where"/>
  184. </select>
  185. <select id="selectCount" resultType="int">
  186. select count(ID) from BIS_INSP_VILLGD_VILL
  187. <include refid="page_where"/>
  188. </select>
  189. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspVillgdVill">
  190. insert into BIS_INSP_VILLGD_VILL(
  191. <include refid="table_columns"/>
  192. )
  193. values (
  194. <include refid="entity_properties"/>
  195. )
  196. </insert>
  197. <delete id="delete" parameterType="java.lang.String">
  198. update BIS_INSP_VILLGD_VILL set DATA_STAT='9' where ID = #{id}
  199. </delete>
  200. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspVillgdVill">
  201. update BIS_INSP_VILLGD_VILL set DATA_STAT='9'
  202. <include refid="page_where"/>
  203. </delete>
  204. <update id="deleteInFlag" parameterType="java.lang.String">
  205. update BIS_INSP_VILLGD_VILL set DATA_STAT = '9' where ID = #{id}
  206. </update>
  207. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspVillgdVill">
  208. update BIS_INSP_VILLGD_VILL
  209. <trim prefix="set" suffixOverrides=",">
  210. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  211. = #{rgstrId},
  212. </if>
  213. <if test="nm != null and nm != ''">NM
  214. = #{nm},
  215. </if>
  216. <if test="loc != null and loc != ''">LOC
  217. = #{loc},
  218. </if>
  219. <if test="isPov != null and isPov != ''">IS_POV
  220. = #{isPov},
  221. </if>
  222. <if test="isMin != null and isMin != ''">IS_MIN
  223. = #{isMin},
  224. </if>
  225. <if test="isOver != null and isOver != ''">IS_OVER
  226. = #{isOver},
  227. </if>
  228. <if test="othNote != null and othNote != ''">OTH_NOTE
  229. = #{othNote},
  230. </if>
  231. <if test="tm != null">TM
  232. = #{tm},
  233. </if>
  234. <if test="isInHome != null and isInHome != ''">IS_IN_HOME
  235. = #{isInHome},
  236. </if>
  237. <if test="total != null and total != ''">TOTAL
  238. = #{total},
  239. </if>
  240. <if test="inTotal != null and inTotal != ''">IN_TOTAL
  241. = #{inTotal},
  242. </if>
  243. <if test="inRate != null and inRate != ''">IN_RATE
  244. = #{inRate},
  245. </if>
  246. <if test="isTari != null and isTari != ''">IS_TARI
  247. = #{isTari},
  248. </if>
  249. <if test="tariMet != null and tariMet != ''">TARI_MET
  250. = #{tariMet},
  251. </if>
  252. <if test="tariMon != null and tariMon != ''">TARI_MON
  253. = #{tariMon},
  254. </if>
  255. <if test="isPayCost != null and isPayCost != ''">IS_PAY_COST
  256. = #{isPayCost},
  257. </if>
  258. <if test="isWaterSupply != null and isWaterSupply != ''">IS_WATER_SUPPLY
  259. = #{isWaterSupply},
  260. </if>
  261. <if test="supplyPblm != null and supplyPblm != ''">SUPPLY_PBLM
  262. = #{supplyPblm},
  263. </if>
  264. <if test="supplyNote != null and supplyNote != ''">SUPPLY_NOTE
  265. = #{supplyNote},
  266. </if>
  267. <if test="persId != null and persId != ''">PERS_ID
  268. = #{persId},
  269. </if>
  270. <if test="intm != null">INTM
  271. = #{intm},
  272. </if>
  273. <if test="uptm != null">UPTM
  274. = #{uptm},
  275. </if>
  276. <if test="note != null and note != ''">NOTE
  277. = #{note},
  278. </if>
  279. <if test="dataStat != null and dataStat != ''">DATA_STAT
  280. = #{dataStat},
  281. </if>
  282. </trim>
  283. <where>ID = #{id}</where>
  284. </update>
  285. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspVillgdVill">
  286. update BIS_INSP_VILLGD_VILL
  287. <trim prefix="set" suffixOverrides=",">
  288. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  289. = #{rgstrId},
  290. </if>
  291. <if test="nm != null and nm != ''">NM
  292. = #{nm},
  293. </if>
  294. <if test="loc != null and loc != ''">LOC
  295. = #{loc},
  296. </if>
  297. <if test="isPov != null and isPov != ''">IS_POV
  298. = #{isPov},
  299. </if>
  300. <if test="isMin != null and isMin != ''">IS_MIN
  301. = #{isMin},
  302. </if>
  303. <if test="isOver != null and isOver != ''">IS_OVER
  304. = #{isOver},
  305. </if>
  306. <if test="othNote != null and othNote != ''">OTH_NOTE
  307. = #{othNote},
  308. </if>
  309. <if test="tm != null">TM
  310. = #{tm},
  311. </if>
  312. <if test="isInHome != null and isInHome != ''">IS_IN_HOME
  313. = #{isInHome},
  314. </if>
  315. <if test="total != null and total != ''">TOTAL
  316. = #{total},
  317. </if>
  318. <if test="inTotal != null and inTotal != ''">IN_TOTAL
  319. = #{inTotal},
  320. </if>
  321. <if test="inRate != null and inRate != ''">IN_RATE
  322. = #{inRate},
  323. </if>
  324. <if test="isTari != null and isTari != ''">IS_TARI
  325. = #{isTari},
  326. </if>
  327. <if test="tariMet != null and tariMet != ''">TARI_MET
  328. = #{tariMet},
  329. </if>
  330. <if test="tariMon != null and tariMon != ''">TARI_MON
  331. = #{tariMon},
  332. </if>
  333. <if test="isPayCost != null and isPayCost != ''">IS_PAY_COST
  334. = #{isPayCost},
  335. </if>
  336. <if test="isWaterSupply != null and isWaterSupply != ''">IS_WATER_SUPPLY
  337. = #{isWaterSupply},
  338. </if>
  339. <if test="supplyPblm != null and supplyPblm != ''">SUPPLY_PBLM
  340. = #{supplyPblm},
  341. </if>
  342. <if test="supplyNote != null and supplyNote != ''">SUPPLY_NOTE
  343. = #{supplyNote},
  344. </if>
  345. <if test="persId != null and persId != ''">PERS_ID
  346. = #{persId},
  347. </if>
  348. <if test="intm != null">INTM
  349. = #{intm},
  350. </if>
  351. <if test="uptm != null">UPTM
  352. = #{uptm},
  353. </if>
  354. <if test="note != null and note != ''">NOTE
  355. = #{note},
  356. </if>
  357. <if test="dataStat != null and dataStat != ''">DATA_STAT
  358. = #{dataStat},
  359. </if>
  360. </trim>
  361. <include refid="page_where"/>
  362. </update>
  363. <!-- 其他自定义SQL -->
  364. </mapper>