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