BisInspRsraqgRgstrCountyDao.xml 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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.BisInspRsraqgRgstrCountyDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsraqgRgstrCounty" id="bisInspRsraqgRgstrCountyResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="adName" column="AD_NAME"/>
  8. <result property="adCode" column="AD_CODE"/>
  9. <result property="tosauwputcosasosrPoints" column="TOSAUWPUTCOSASOSR_POINTS"/>
  10. <result property="tosauwputcosasosrDesc" column="TOSAUWPUTCOSASOSR_DESC"/>
  11. <result property="ctsrsitPoints" column="CTSRSIT_POINTS"/>
  12. <result property="ctsrsitDesc" column="CTSRSIT_DESC"/>
  13. <result property="sosrftipspPoints" column="SOSRFTIPSP_POINTS"/>
  14. <result property="sosrftipspDesc" column="SOSRFTIPSP_DESC"/>
  15. <result property="ftlpcapaspPoints" column="FTLPCAPASP_POINTS"/>
  16. <result property="ftlpcapaspDesc" column="FTLPCAPASP_DESC"/>
  17. <result property="tstswosrwtjPoints" column="TSTSWOSRWTJ_POINTS"/>
  18. <result property="tstswosrwtjDesc" column="TSTSWOSRWTJ_DESC"/>
  19. <result property="totSco" column="TOT_SCO"/>
  20. <result property="recPersId" column="REC_PERS_ID"/>
  21. <result property="recPers2" column="REC_PERS2"/>
  22. <result property="recPersTel" column="REC_PERS_TEL"/>
  23. <result property="intm" column="INTM"/>
  24. <result property="uptm" column="UPTM"/>
  25. <result property="status" column="STATUS"/>
  26. </resultMap>
  27. <sql id="table_columns">
  28. ID,
  29. RGSTR_ID,
  30. AD_NAME,
  31. AD_CODE,
  32. TOSAUWPUTCOSASOSR_POINTS,
  33. TOSAUWPUTCOSASOSR_DESC,
  34. CTSRSIT_POINTS,
  35. CTSRSIT_DESC,
  36. SOSRFTIPSP_POINTS,
  37. SOSRFTIPSP_DESC,
  38. FTLPCAPASP_POINTS,
  39. FTLPCAPASP_DESC,
  40. TSTSWOSRWTJ_POINTS,
  41. TSTSWOSRWTJ_DESC,
  42. TOT_SCO,
  43. REC_PERS_ID,
  44. REC_PERS2,
  45. REC_PERS_TEL,
  46. INTM,
  47. UPTM,
  48. STATUS
  49. </sql>
  50. <sql id="entity_properties">
  51. #{id},
  52. #{rgstrId},
  53. #{adName},
  54. #{adCode},
  55. #{tosauwputcosasosrPoints},
  56. #{tosauwputcosasosrDesc},
  57. #{ctsrsitPoints},
  58. #{ctsrsitDesc},
  59. #{sosrftipspPoints},
  60. #{sosrftipspDesc},
  61. #{ftlpcapaspPoints},
  62. #{ftlpcapaspDesc},
  63. #{tstswosrwtjPoints},
  64. #{tstswosrwtjDesc},
  65. #{totSco},
  66. #{recPersId},
  67. #{recPers2},
  68. #{recPersTel},
  69. #{intm},
  70. #{uptm},
  71. #{status}
  72. </sql>
  73. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  74. <sql id="page_where">
  75. <trim prefix="where" prefixOverrides="and | or ">
  76. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  77. <if test="tosauwputcosasosrPoints != null and tosauwputcosasosrPoints != ''">and TOSAUWPUTCOSASOSR_POINTS = #{tosauwputcosasosrPoints}</if>
  78. <if test="tosauwputcosasosrDesc != null and tosauwputcosasosrDesc != ''">and TOSAUWPUTCOSASOSR_DESC = #{tosauwputcosasosrDesc}</if>
  79. <if test="ctsrsitPoints != null and ctsrsitPoints != ''">and CTSRSIT_POINTS = #{ctsrsitPoints}</if>
  80. <if test="ctsrsitDesc != null and ctsrsitDesc != ''">and CTSRSIT_DESC = #{ctsrsitDesc}</if>
  81. <if test="sosrftipspPoints != null and sosrftipspPoints != ''">and SOSRFTIPSP_POINTS = #{sosrftipspPoints}</if>
  82. <if test="sosrftipspDesc != null and sosrftipspDesc != ''">and SOSRFTIPSP_DESC = #{sosrftipspDesc}</if>
  83. <if test="ftlpcapaspPoints != null and ftlpcapaspPoints != ''">and FTLPCAPASP_POINTS = #{ftlpcapaspPoints}</if>
  84. <if test="ftlpcapaspDesc != null and ftlpcapaspDesc != ''">and FTLPCAPASP_DESC = #{ftlpcapaspDesc}</if>
  85. <if test="tstswosrwtjPoints != null and tstswosrwtjPoints != ''">and TSTSWOSRWTJ_POINTS = #{tstswosrwtjPoints}</if>
  86. <if test="tstswosrwtjDesc != null and tstswosrwtjDesc != ''">and TSTSWOSRWTJ_DESC = #{tstswosrwtjDesc}</if>
  87. <if test="totSco != null and totSco != ''">and TOT_SCO = #{totSco}</if>
  88. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  89. <if test="recPers2 != null and recPers2 != ''">and REC_PERS2 = #{recPers2}</if>
  90. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  91. <if test="intm != null">and INTM = #{intm}</if>
  92. <if test="uptm != null">and UPTM = #{uptm}</if>
  93. <if test="status != null and status != ''">and STATUS = #{status}</if>
  94. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  95. <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
  96. </trim>
  97. </sql>
  98. <select id="get" resultMap="bisInspRsraqgRgstrCountyResultMap" parameterType="String" >
  99. select <include refid="table_columns" /> from BIS_INSP_RSRAQG_RGSTR_COUNTY where ID = #{id}
  100. </select>
  101. <select id="getBy" resultMap="bisInspRsraqgRgstrCountyResultMap">
  102. select <include refid="table_columns" /> from BIS_INSP_RSRAQG_RGSTR_COUNTY <include refid="page_where" />
  103. </select>
  104. <select id="findAll" resultMap="bisInspRsraqgRgstrCountyResultMap">
  105. select <include refid="table_columns" /> from BIS_INSP_RSRAQG_RGSTR_COUNTY
  106. </select>
  107. <select id="findList" resultMap="bisInspRsraqgRgstrCountyResultMap">
  108. select <include refid="table_columns" /> from BIS_INSP_RSRAQG_RGSTR_COUNTY <include refid="page_where" />
  109. </select>
  110. <select id="selectCount" resultType="int" >
  111. select count(ID) from BIS_INSP_RSRAQG_RGSTR_COUNTY <include refid="page_where" />
  112. </select>
  113. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsraqgRgstrCounty">
  114. insert into BIS_INSP_RSRAQG_RGSTR_COUNTY( <include refid="table_columns" /> )
  115. values ( <include refid="entity_properties" /> )
  116. </insert>
  117. <delete id="delete" parameterType="java.lang.String">
  118. update BIS_INSP_RSRAQG_RGSTR_COUNTY set DATA_STAT='9' where ID = #{id}
  119. </delete>
  120. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsraqgRgstrCounty">
  121. update BIS_INSP_RSRAQG_RGSTR_COUNTY set DATA_STAT='9' <include refid="page_where" />
  122. </delete>
  123. <update id="deleteInFlag" parameterType="java.lang.String">
  124. update BIS_INSP_RSRAQG_RGSTR_COUNTY set DATA_STAT = '9' where ID = #{id}
  125. </update>
  126. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsraqgRgstrCounty">
  127. update BIS_INSP_RSRAQG_RGSTR_COUNTY
  128. <trim prefix="set" suffixOverrides=",">
  129. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  130. <if test="tosauwputcosasosrPoints != null">TOSAUWPUTCOSASOSR_POINTS = #{tosauwputcosasosrPoints},</if>
  131. TOSAUWPUTCOSASOSR_DESC = #{tosauwputcosasosrDesc},
  132. <if test="ctsrsitPoints != null">CTSRSIT_POINTS = #{ctsrsitPoints},</if>
  133. CTSRSIT_DESC = #{ctsrsitDesc},
  134. <if test="sosrftipspPoints != null">SOSRFTIPSP_POINTS = #{sosrftipspPoints},</if>
  135. SOSRFTIPSP_DESC = #{sosrftipspDesc},
  136. <if test="ftlpcapaspPoints != null">FTLPCAPASP_POINTS = #{ftlpcapaspPoints},</if>
  137. FTLPCAPASP_DESC = #{ftlpcapaspDesc},
  138. <if test="tstswosrwtjPoints != null">TSTSWOSRWTJ_POINTS = #{tstswosrwtjPoints},</if>
  139. TSTSWOSRWTJ_DESC = #{tstswosrwtjDesc},
  140. <if test="totSco != null">TOT_SCO = #{totSco},</if>
  141. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  142. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  143. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  144. <if test="intm != null">INTM = #{intm},</if>
  145. <if test="uptm != null">UPTM = #{uptm},</if>
  146. <if test="status != null and status != ''">STATUS = #{status},</if>
  147. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  148. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  149. </trim>
  150. <where>ID = #{id}</where>
  151. </update>
  152. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsraqgRgstrCounty">
  153. update BIS_INSP_RSRAQG_RGSTR_COUNTY
  154. <trim prefix="set" suffixOverrides=",">
  155. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  156. <if test="tosauwputcosasosrPoints != null">TOSAUWPUTCOSASOSR_POINTS = #{tosauwputcosasosrPoints},</if>
  157. TOSAUWPUTCOSASOSR_DESC = #{tosauwputcosasosrDesc},
  158. <if test="ctsrsitPoints != null">CTSRSIT_POINTS = #{ctsrsitPoints},</if>
  159. CTSRSIT_DESC = #{ctsrsitDesc},
  160. <if test="sosrftipspPoints != null">SOSRFTIPSP_POINTS = #{sosrftipspPoints},</if>
  161. SOSRFTIPSP_DESC = #{sosrftipspDesc},
  162. <if test="ftlpcapaspPoints != null">FTLPCAPASP_POINTS = #{ftlpcapaspPoints},</if>
  163. FTLPCAPASP_DESC = #{ftlpcapaspDesc},
  164. <if test="tstswosrwtjPoints != null">TSTSWOSRWTJ_POINTS = #{tstswosrwtjPoints},</if>
  165. TSTSWOSRWTJ_DESC = #{tstswosrwtjDesc},
  166. <if test="totSco != null">TOT_SCO = #{totSco},</if>
  167. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  168. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  169. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  170. <if test="intm != null">INTM = #{intm},</if>
  171. <if test="uptm != null">UPTM = #{uptm},</if>
  172. <if test="status != null and status != ''">STATUS = #{status},</if>
  173. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  174. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  175. </trim>
  176. <include refid="page_where" />
  177. </update>
  178. <!-- 其他自定义SQL -->
  179. </mapper>