BisInspMfdpqhTownDao.xml 9.2 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.BisInspMfdpqhTownDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspMfdpqhTown" id="bisInspMfdpqhTownResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="nm" column="NM"/>
  8. <result property="isDuty" column="IS_DUTY"/>
  9. <result property="isPlan" column="IS_PLAN"/>
  10. <result property="isWarn" column="IS_WARN"/>
  11. <result property="isLogo" column="IS_LOGO"/>
  12. <result property="isSend" column="IS_SEND"/>
  13. <result property="chkPers" column="CHK_PERS"/>
  14. <result property="chkTm" column="CHK_TM"/>
  15. <result property="persId" column="PERS_ID"/>
  16. <result property="intm" column="INTM"/>
  17. <result property="uptm" column="UPTM"/>
  18. <result property="note" column="NOTE"/>
  19. <result property="dataStat" column="DATA_STAT"/>
  20. </resultMap>
  21. <sql id="table_columns">
  22. ID,
  23. RGSTR_ID,
  24. NM,
  25. IS_DUTY,
  26. IS_PLAN,
  27. IS_WARN,
  28. IS_LOGO,
  29. IS_SEND,
  30. CHK_PERS,
  31. CHK_TM,
  32. PERS_ID,
  33. INTM,
  34. UPTM,
  35. NOTE,
  36. DATA_STAT
  37. </sql>
  38. <sql id="entity_properties">
  39. #{id},
  40. #{rgstrId},
  41. #{nm},
  42. #{isDuty},
  43. #{isPlan},
  44. #{isWarn},
  45. #{isLogo},
  46. #{isSend},
  47. #{chkPers},
  48. #{chkTm},
  49. #{persId},
  50. #{intm},
  51. #{uptm},
  52. #{note},
  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="rgstrId != null and rgstrId != ''">
  59. and RGSTR_ID = #{rgstrId}
  60. </if>
  61. <if test="nm != null and nm != ''">
  62. and NM = #{nm}
  63. </if>
  64. <if test="isDuty != null and isDuty != ''">
  65. and IS_DUTY = #{isDuty}
  66. </if>
  67. <if test="isPlan != null and isPlan != ''">
  68. and IS_PLAN = #{isPlan}
  69. </if>
  70. <if test="isWarn != null and isWarn != ''">
  71. and IS_WARN = #{isWarn}
  72. </if>
  73. <if test="isLogo != null and isLogo != ''">
  74. and IS_LOGO = #{isLogo}
  75. </if>
  76. <if test="isSend != null and isSend != ''">
  77. and IS_SEND = #{isSend}
  78. </if>
  79. <if test="chkPers != null and chkPers != ''">
  80. and CHK_PERS = #{chkPers}
  81. </if>
  82. <if test="chkTm != null">
  83. and CHK_TM = #{chkTm}
  84. </if>
  85. <if test="persId != null and persId != ''">
  86. and PERS_ID = #{persId}
  87. </if>
  88. <if test="intm != null">
  89. and INTM = #{intm}
  90. </if>
  91. <if test="uptm != null">
  92. and UPTM = #{uptm}
  93. </if>
  94. <if test="note != null and note != ''">
  95. and NOTE = #{note}
  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="bisInspMfdpqhTownResultMap" parameterType="String">
  104. select
  105. <include refid="table_columns"/>
  106. from BIS_INSP_MFDPQH_TOWN where RGSTR_ID = #{id}
  107. </select>
  108. <select id="getBy" resultMap="bisInspMfdpqhTownResultMap">
  109. select
  110. <include refid="table_columns"/>
  111. from BIS_INSP_MFDPQH_TOWN
  112. <include refid="page_where"/>
  113. </select>
  114. <select id="findAll" resultMap="bisInspMfdpqhTownResultMap">
  115. select
  116. <include refid="table_columns"/>
  117. from BIS_INSP_MFDPQH_TOWN
  118. </select>
  119. <select id="findList" resultMap="bisInspMfdpqhTownResultMap">
  120. select
  121. <include refid="table_columns"/>
  122. from BIS_INSP_MFDPQH_TOWN
  123. <include refid="page_where"/>
  124. </select>
  125. <select id="selectCount" resultType="int">
  126. select count(ID) from BIS_INSP_MFDPQH_TOWN
  127. <include refid="page_where"/>
  128. </select>
  129. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspMfdpqhTown">
  130. insert into BIS_INSP_MFDPQH_TOWN(
  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_MFDPQH_TOWN set DATA_STAT='9' where ID = #{id}
  139. </delete>
  140. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspMfdpqhTown">
  141. update BIS_INSP_MFDPQH_TOWN set DATA_STAT='9'
  142. <include refid="page_where"/>
  143. </delete>
  144. <update id="deleteInFlag" parameterType="java.lang.String">
  145. update BIS_INSP_MFDPQH_TOWN set DATA_STAT = '9' where ID = #{id}
  146. </update>
  147. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspMfdpqhTown">
  148. update BIS_INSP_MFDPQH_TOWN
  149. <trim prefix="set" suffixOverrides=",">
  150. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  151. = #{rgstrId},
  152. </if>
  153. <if test="nm != null and nm != ''">NM
  154. = #{nm},
  155. </if>
  156. <if test="isDuty != null and isDuty != ''">IS_DUTY
  157. = #{isDuty},
  158. </if>
  159. <if test="isPlan != null and isPlan != ''">IS_PLAN
  160. = #{isPlan},
  161. </if>
  162. <if test="isWarn != null and isWarn != ''">IS_WARN
  163. = #{isWarn},
  164. </if>
  165. <if test="isLogo != null and isLogo != ''">IS_LOGO
  166. = #{isLogo},
  167. </if>
  168. <if test="isSend != null and isSend != ''">IS_SEND
  169. = #{isSend},
  170. </if>
  171. <if test="chkPers != null and chkPers != ''">CHK_PERS
  172. = #{chkPers},
  173. </if>
  174. <if test="chkTm != null">CHK_TM
  175. = #{chkTm},
  176. </if>
  177. <if test="persId != null and persId != ''">PERS_ID
  178. = #{persId},
  179. </if>
  180. <if test="intm != null">INTM
  181. = #{intm},
  182. </if>
  183. <if test="uptm != null">UPTM
  184. = #{uptm},
  185. </if>
  186. <if test="note != null and note != ''">NOTE
  187. = #{note},
  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.BisInspMfdpqhTown">
  196. update BIS_INSP_MFDPQH_TOWN
  197. <trim prefix="set" suffixOverrides=",">
  198. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  199. = #{rgstrId},
  200. </if>
  201. <if test="nm != null and nm != ''">NM
  202. = #{nm},
  203. </if>
  204. <if test="isDuty != null and isDuty != ''">IS_DUTY
  205. = #{isDuty},
  206. </if>
  207. <if test="isPlan != null and isPlan != ''">IS_PLAN
  208. = #{isPlan},
  209. </if>
  210. <if test="isWarn != null and isWarn != ''">IS_WARN
  211. = #{isWarn},
  212. </if>
  213. <if test="isLogo != null and isLogo != ''">IS_LOGO
  214. = #{isLogo},
  215. </if>
  216. <if test="isSend != null and isSend != ''">IS_SEND
  217. = #{isSend},
  218. </if>
  219. <if test="chkPers != null and chkPers != ''">CHK_PERS
  220. = #{chkPers},
  221. </if>
  222. <if test="chkTm != null">CHK_TM
  223. = #{chkTm},
  224. </if>
  225. <if test="persId != null and persId != ''">PERS_ID
  226. = #{persId},
  227. </if>
  228. <if test="intm != null">INTM
  229. = #{intm},
  230. </if>
  231. <if test="uptm != null">UPTM
  232. = #{uptm},
  233. </if>
  234. <if test="note != null and note != ''">NOTE
  235. = #{note},
  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>