BisInspDpgmOrgDao.xml 8.9 KB

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