BisInspWtprjSectionDao.xml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  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.BisInspWtprjSectionDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWtprjSection" id="bisInspWtprjSectionResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="objId" column="OBJ_ID"/>
  8. <result property="nm" column="NM"/>
  9. <result property="adCode" column="AD_CODE"/>
  10. <result property="centerX" column="CENTER_X"/>
  11. <result property="centerY" column="CENTER_Y"/>
  12. <result property="gdX" column="GD_X"/>
  13. <result property="gdY" column="GD_Y"/>
  14. <result property="persId" column="PERS_ID"/>
  15. <result property="intm" column="INTM"/>
  16. <result property="uptm" column="UPTM"/>
  17. <result property="note" column="NOTE"/>
  18. <result property="dataStat" column="DATA_STAT"/>
  19. </resultMap>
  20. <sql id="table_columns">
  21. ID,
  22. RGSTR_ID,
  23. OBJ_ID,
  24. NM,
  25. AD_CODE,
  26. CENTER_X,
  27. CENTER_Y,
  28. GD_X,
  29. GD_Y,
  30. PERS_ID,
  31. INTM,
  32. UPTM,
  33. NOTE,
  34. DATA_STAT
  35. </sql>
  36. <sql id="entity_properties">
  37. #{id},
  38. #{rgstrId},
  39. #{objId},
  40. #{nm},
  41. #{adCode},
  42. #{centerX},
  43. #{centerY},
  44. #{gdX},
  45. #{gdY},
  46. #{persId},
  47. #{intm},
  48. #{uptm},
  49. #{note},
  50. #{dataStat}
  51. </sql>
  52. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  53. <sql id="page_where">
  54. <trim prefix="where" prefixOverrides="and | or ">
  55. <if test="rgstrId != null and rgstrId != ''">
  56. and RGSTR_ID = #{rgstrId}
  57. </if>
  58. <if test="objId != null and objId != ''">
  59. and OBJ_ID = #{objId}
  60. </if>
  61. <if test="nm != null and nm != ''">
  62. and NM = #{nm}
  63. </if>
  64. <if test="adCode != null and adCode != ''">
  65. and AD_CODE = #{adCode}
  66. </if>
  67. <if test="centerX != null and centerX != ''">
  68. and CENTER_X = #{centerX}
  69. </if>
  70. <if test="centerY != null and centerY != ''">
  71. and CENTER_Y = #{centerY}
  72. </if>
  73. <if test="gdX != null and gdX != ''">
  74. and GD_X = #{gdX}
  75. </if>
  76. <if test="gdY != null and gdY != ''">
  77. and GD_Y = #{gdY}
  78. </if>
  79. <if test="persId != null and persId != ''">
  80. and PERS_ID = #{persId}
  81. </if>
  82. <if test="intm != null">
  83. and INTM = #{intm}
  84. </if>
  85. <if test="uptm != null">
  86. and UPTM = #{uptm}
  87. </if>
  88. <if test="note != null and note != ''">
  89. and NOTE = #{note}
  90. </if>
  91. <if test="dataStat != null and dataStat != ''">
  92. and DATA_STAT = #{dataStat}
  93. </if>
  94. and DATA_STAT='0'
  95. </trim>
  96. </sql>
  97. <select id="get" resultMap="bisInspWtprjSectionResultMap" parameterType="String">
  98. select
  99. <include refid="table_columns"/>
  100. from BIS_INSP_WTPRJ_SECTION where ID = #{id}
  101. </select>
  102. <select id="getBy" resultMap="bisInspWtprjSectionResultMap">
  103. select
  104. <include refid="table_columns"/>
  105. from BIS_INSP_WTPRJ_SECTION
  106. <include refid="page_where"/>
  107. </select>
  108. <select id="findAll" resultMap="bisInspWtprjSectionResultMap">
  109. select
  110. <include refid="table_columns"/>
  111. from BIS_INSP_WTPRJ_SECTION
  112. </select>
  113. <select id="findList" resultMap="bisInspWtprjSectionResultMap">
  114. select
  115. <include refid="table_columns"/>
  116. from BIS_INSP_WTPRJ_SECTION
  117. <include refid="page_where"/>
  118. </select>
  119. <select id="selectCount" resultType="int">
  120. select count(ID) from BIS_INSP_WTPRJ_SECTION
  121. <include refid="page_where"/>
  122. </select>
  123. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtprjSection">
  124. insert into BIS_INSP_WTPRJ_SECTION(
  125. <include refid="table_columns"/>
  126. )
  127. values (
  128. <include refid="entity_properties"/>
  129. )
  130. </insert>
  131. <delete id="delete" parameterType="java.lang.String">
  132. update BIS_INSP_WTPRJ_SECTION set DATA_STAT='9' where ID = #{id}
  133. </delete>
  134. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtprjSection">
  135. update BIS_INSP_WTPRJ_SECTION set DATA_STAT='9'
  136. <include refid="page_where"/>
  137. </delete>
  138. <update id="deleteInFlag" parameterType="java.lang.String">
  139. update BIS_INSP_WTPRJ_SECTION set DATA_STAT = '9' where ID = #{id}
  140. </update>
  141. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtprjSection">
  142. update BIS_INSP_WTPRJ_SECTION
  143. <trim prefix="set" suffixOverrides=",">
  144. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  145. = #{rgstrId},
  146. </if>
  147. <if test="objId != null and objId != ''">OBJ_ID
  148. = #{objId},
  149. </if>
  150. <if test="nm != null and nm != ''">NM
  151. = #{nm},
  152. </if>
  153. <if test="adCode != null and adCode != ''">AD_CODE
  154. = #{adCode},
  155. </if>
  156. <if test="centerX != null and centerX != ''">CENTER_X
  157. = #{centerX},
  158. </if>
  159. <if test="centerY != null and centerY != ''">CENTER_Y
  160. = #{centerY},
  161. </if>
  162. <if test="gdX != null and gdX != ''">GD_X
  163. = #{gdX},
  164. </if>
  165. <if test="gdY != null and gdY != ''">GD_Y
  166. = #{gdY},
  167. </if>
  168. <if test="persId != null and persId != ''">PERS_ID
  169. = #{persId},
  170. </if>
  171. <if test="intm != null">INTM
  172. = #{intm},
  173. </if>
  174. <if test="uptm != null">UPTM
  175. = #{uptm},
  176. </if>
  177. <if test="note != null and note != ''">NOTE
  178. = #{note},
  179. </if>
  180. <if test="dataStat != null and dataStat != ''">DATA_STAT
  181. = #{dataStat},
  182. </if>
  183. </trim>
  184. <where>ID = #{id}</where>
  185. </update>
  186. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWtprjSection">
  187. update BIS_INSP_WTPRJ_SECTION
  188. <trim prefix="set" suffixOverrides=",">
  189. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  190. = #{rgstrId},
  191. </if>
  192. <if test="objId != null and objId != ''">OBJ_ID
  193. = #{objId},
  194. </if>
  195. <if test="nm != null and nm != ''">NM
  196. = #{nm},
  197. </if>
  198. <if test="adCode != null and adCode != ''">AD_CODE
  199. = #{adCode},
  200. </if>
  201. <if test="centerX != null and centerX != ''">CENTER_X
  202. = #{centerX},
  203. </if>
  204. <if test="centerY != null and centerY != ''">CENTER_Y
  205. = #{centerY},
  206. </if>
  207. <if test="gdX != null and gdX != ''">GD_X
  208. = #{gdX},
  209. </if>
  210. <if test="gdY != null and gdY != ''">GD_Y
  211. = #{gdY},
  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="note != null and note != ''">NOTE
  223. = #{note},
  224. </if>
  225. <if test="dataStat != null and dataStat != ''">DATA_STAT
  226. = #{dataStat},
  227. </if>
  228. </trim>
  229. <include refid="page_where"/>
  230. </update>
  231. <!-- 其他自定义SQL -->
  232. </mapper>