BisInspKeysafqhRegisterSecDao.xml 9.4 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.BisInspKeysafqhRegisterSecDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspKeysafqhRegisterSec" id="bisInspKeysafqhRegisterSecResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="regId" column="REG_ID"/>
  7. <result property="objId" column="OBJ_ID"/>
  8. <result property="nm" column="NM"/>
  9. <result property="adCode" column="AD_CODE"/>
  10. <result property="orgId" column="ORG_ID"/>
  11. <result property="lgtd" column="LGTD"/>
  12. <result property="lttd" column="LTTD"/>
  13. <result property="lgtdPc" column="LGTD_PC"/>
  14. <result property="lttdPc" column="LTTD_PC"/>
  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. REG_ID,
  24. OBJ_ID,
  25. NM,
  26. AD_CODE,
  27. ORG_ID,
  28. LGTD,
  29. LTTD,
  30. LGTD_PC,
  31. LTTD_PC,
  32. PERS_ID,
  33. INTM,
  34. UPTM,
  35. NOTE,
  36. DATA_STAT
  37. </sql>
  38. <sql id="entity_properties">
  39. #{id},
  40. #{regId},
  41. #{objId},
  42. #{nm},
  43. #{adCode},
  44. #{orgId},
  45. #{lgtd},
  46. #{lttd},
  47. #{lgtdPc},
  48. #{lttdPc},
  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="regId != null and regId != ''">
  59. and REG_ID = #{regId}
  60. </if>
  61. <if test="objId != null and objId != ''">
  62. and OBJ_ID = #{objId}
  63. </if>
  64. <if test="nm != null and nm != ''">
  65. and NM = #{nm}
  66. </if>
  67. <if test="adCode != null and adCode != ''">
  68. and AD_CODE = #{adCode}
  69. </if>
  70. <if test="orgId != null and orgId != ''">
  71. and ORG_ID = #{orgId}
  72. </if>
  73. <if test="lgtd != null and lgtd != ''">
  74. and LGTD = #{lgtd}
  75. </if>
  76. <if test="lttd != null and lttd != ''">
  77. and LTTD = #{lttd}
  78. </if>
  79. <if test="lgtdPc != null and lgtdPc != ''">
  80. and LGTD_PC = #{lgtdPc}
  81. </if>
  82. <if test="lttdPc != null and lttdPc != ''">
  83. and LTTD_PC = #{lttdPc}
  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="bisInspKeysafqhRegisterSecResultMap" parameterType="String">
  104. select
  105. <include refid="table_columns"/>
  106. from BIS_INSP_KEYSAFQH_REGISTER_SEC where ID = #{id}
  107. </select>
  108. <select id="getBy" resultMap="bisInspKeysafqhRegisterSecResultMap">
  109. select
  110. <include refid="table_columns"/>
  111. from BIS_INSP_KEYSAFQH_REGISTER_SEC
  112. <include refid="page_where"/>
  113. </select>
  114. <select id="findAll" resultMap="bisInspKeysafqhRegisterSecResultMap">
  115. select
  116. <include refid="table_columns"/>
  117. from BIS_INSP_KEYSAFQH_REGISTER_SEC
  118. </select>
  119. <select id="findList" resultMap="bisInspKeysafqhRegisterSecResultMap">
  120. select
  121. <include refid="table_columns"/>
  122. from BIS_INSP_KEYSAFQH_REGISTER_SEC
  123. <include refid="page_where"/>
  124. </select>
  125. <select id="selectCount" resultType="int">
  126. select count(ID) from BIS_INSP_KEYSAFQH_REGISTER_SEC
  127. <include refid="page_where"/>
  128. </select>
  129. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspKeysafqhRegisterSec">
  130. insert into BIS_INSP_KEYSAFQH_REGISTER_SEC(
  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_KEYSAFQH_REGISTER_SEC set DATA_STAT='9' where ID = #{id}
  139. </delete>
  140. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspKeysafqhRegisterSec">
  141. update BIS_INSP_KEYSAFQH_REGISTER_SEC set DATA_STAT='9'
  142. <include refid="page_where"/>
  143. </delete>
  144. <update id="deleteInFlag" parameterType="java.lang.String">
  145. update BIS_INSP_KEYSAFQH_REGISTER_SEC set DATA_STAT = '9' where ID = #{id}
  146. </update>
  147. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspKeysafqhRegisterSec">
  148. update BIS_INSP_KEYSAFQH_REGISTER_SEC
  149. <trim prefix="set" suffixOverrides=",">
  150. <if test="regId != null and regId != ''">REG_ID
  151. = #{regId},
  152. </if>
  153. <if test="objId != null and objId != ''">OBJ_ID
  154. = #{objId},
  155. </if>
  156. <if test="nm != null and nm != ''">NM
  157. = #{nm},
  158. </if>
  159. <if test="adCode != null and adCode != ''">AD_CODE
  160. = #{adCode},
  161. </if>
  162. <if test="orgId != null and orgId != ''">ORG_ID
  163. = #{orgId},
  164. </if>
  165. <if test="lgtd != null and lgtd != ''">LGTD
  166. = #{lgtd},
  167. </if>
  168. <if test="lttd != null and lttd != ''">LTTD
  169. = #{lttd},
  170. </if>
  171. <if test="lgtdPc != null and lgtdPc != ''">LGTD_PC
  172. = #{lgtdPc},
  173. </if>
  174. <if test="lttdPc != null and lttdPc != ''">LTTD_PC
  175. = #{lttdPc},
  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.BisInspKeysafqhRegisterSec">
  196. update BIS_INSP_KEYSAFQH_REGISTER_SEC
  197. <trim prefix="set" suffixOverrides=",">
  198. <if test="regId != null and regId != ''">REG_ID
  199. = #{regId},
  200. </if>
  201. <if test="objId != null and objId != ''">OBJ_ID
  202. = #{objId},
  203. </if>
  204. <if test="nm != null and nm != ''">NM
  205. = #{nm},
  206. </if>
  207. <if test="adCode != null and adCode != ''">AD_CODE
  208. = #{adCode},
  209. </if>
  210. <if test="orgId != null and orgId != ''">ORG_ID
  211. = #{orgId},
  212. </if>
  213. <if test="lgtd != null and lgtd != ''">LGTD
  214. = #{lgtd},
  215. </if>
  216. <if test="lttd != null and lttd != ''">LTTD
  217. = #{lttd},
  218. </if>
  219. <if test="lgtdPc != null and lgtdPc != ''">LGTD_PC
  220. = #{lgtdPc},
  221. </if>
  222. <if test="lttdPc != null and lttdPc != ''">LTTD_PC
  223. = #{lttdPc},
  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>