BisInspVill2021MopoDao.xml 13 KB

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