BisInspRsraqgRgstrCityDao.xml 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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.BisInspRsraqgRgstrCityDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsraqgRgstrCity" id="bisInspRsraqgRgstrCityResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="tolamruutjtcosarwPoints" column="TOLAMRUUTJTCOSARW_POINTS"/>
  8. <result property="tolamruutjtcosarwDesc" column="TOLAMRUUTJTCOSARW_DESC"/>
  9. <result property="tcttosolamrPoints" column="TCTTOSOLAMR_POINTS"/>
  10. <result property="tcttosolamrDesc" column="TCTTOSOLAMR_DESC"/>
  11. <result property="solamrftipspPoints" column="SOLAMRFTIPSP_POINTS"/>
  12. <result property="solamrftipspDesc" column="SOLAMRFTIPSP_DESC"/>
  13. <result property="tgaucrsarwPoints" column="TGAUCRSARW_POINTS"/>
  14. <result property="tgaucrsarwDesc" column="TGAUCRSARW_DESC"/>
  15. <result property="cwplrsPoints" column="CWPLRS_POINTS"/>
  16. <result property="cwplrsDesc" column="CWPLRS_DESC"/>
  17. <result property="tstswolamrwtjPoints" column="TSTSWOLAMRWTJ_POINTS"/>
  18. <result property="tstswolamrwtjDesc" column="TSTSWOLAMRWTJ_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. TOLAMRUUTJTCOSARW_POINTS,
  31. TOLAMRUUTJTCOSARW_DESC,
  32. TCTTOSOLAMR_POINTS,
  33. TCTTOSOLAMR_DESC,
  34. SOLAMRFTIPSP_POINTS,
  35. SOLAMRFTIPSP_DESC,
  36. TGAUCRSARW_POINTS,
  37. TGAUCRSARW_DESC,
  38. CWPLRS_POINTS,
  39. CWPLRS_DESC,
  40. TSTSWOLAMRWTJ_POINTS,
  41. TSTSWOLAMRWTJ_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. #{tolamruutjtcosarwPoints},
  54. #{tolamruutjtcosarwDesc},
  55. #{tcttosolamrPoints},
  56. #{tcttosolamrDesc},
  57. #{solamrftipspPoints},
  58. #{solamrftipspDesc},
  59. #{tgaucrsarwPoints},
  60. #{tgaucrsarwDesc},
  61. #{cwplrsPoints},
  62. #{cwplrsDesc},
  63. #{tstswolamrwtjPoints},
  64. #{tstswolamrwtjDesc},
  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="tolamruutjtcosarwPoints != null and tolamruutjtcosarwPoints != ''">and TOLAMRUUTJTCOSARW_POINTS = #{tolamruutjtcosarwPoints}</if>
  78. <if test="tolamruutjtcosarwDesc != null and tolamruutjtcosarwDesc != ''">and TOLAMRUUTJTCOSARW_DESC = #{tolamruutjtcosarwDesc}</if>
  79. <if test="tcttosolamrPoints != null and tcttosolamrPoints != ''">and TCTTOSOLAMR_POINTS = #{tcttosolamrPoints}</if>
  80. <if test="tcttosolamrDesc != null and tcttosolamrDesc != ''">and TCTTOSOLAMR_DESC = #{tcttosolamrDesc}</if>
  81. <if test="solamrftipspPoints != null and solamrftipspPoints != ''">and SOLAMRFTIPSP_POINTS = #{solamrftipspPoints}</if>
  82. <if test="solamrftipspDesc != null and solamrftipspDesc != ''">and SOLAMRFTIPSP_DESC = #{solamrftipspDesc}</if>
  83. <if test="tgaucrsarwPoints != null and tgaucrsarwPoints != ''">and TGAUCRSARW_POINTS = #{tgaucrsarwPoints}</if>
  84. <if test="tgaucrsarwDesc != null and tgaucrsarwDesc != ''">and TGAUCRSARW_DESC = #{tgaucrsarwDesc}</if>
  85. <if test="cwplrsPoints != null and cwplrsPoints != ''">and CWPLRS_POINTS = #{cwplrsPoints}</if>
  86. <if test="cwplrsDesc != null and cwplrsDesc != ''">and CWPLRS_DESC = #{cwplrsDesc}</if>
  87. <if test="tstswolamrwtjPoints != null and tstswolamrwtjPoints != ''">and TSTSWOLAMRWTJ_POINTS = #{tstswolamrwtjPoints}</if>
  88. <if test="tstswolamrwtjDesc != null and tstswolamrwtjDesc != ''">and TSTSWOLAMRWTJ_DESC = #{tstswolamrwtjDesc}</if>
  89. <if test="totSco != null and totSco != ''">and TOT_SCO = #{totSco}</if>
  90. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  91. <if test="recPers2 != null and recPers2 != ''">and REC_PERS2 = #{recPers2}</if>
  92. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  93. <if test="intm != null">and INTM = #{intm}</if>
  94. <if test="uptm != null">and UPTM = #{uptm}</if>
  95. <if test="status != null and status != ''">and STATUS = #{status}</if>
  96. </trim>
  97. </sql>
  98. <select id="get" resultMap="bisInspRsraqgRgstrCityResultMap" parameterType="String" >
  99. select <include refid="table_columns" /> from BIS_INSP_RSRAQG_RGSTR_CITY where ID = #{id}
  100. </select>
  101. <select id="getBy" resultMap="bisInspRsraqgRgstrCityResultMap">
  102. select <include refid="table_columns" /> from BIS_INSP_RSRAQG_RGSTR_CITY <include refid="page_where" />
  103. </select>
  104. <select id="findAll" resultMap="bisInspRsraqgRgstrCityResultMap">
  105. select <include refid="table_columns" /> from BIS_INSP_RSRAQG_RGSTR_CITY
  106. </select>
  107. <select id="findList" resultMap="bisInspRsraqgRgstrCityResultMap">
  108. select <include refid="table_columns" /> from BIS_INSP_RSRAQG_RGSTR_CITY <include refid="page_where" />
  109. </select>
  110. <select id="selectCount" resultType="int" >
  111. select count(ID) from BIS_INSP_RSRAQG_RGSTR_CITY <include refid="page_where" />
  112. </select>
  113. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsraqgRgstrCity">
  114. insert into BIS_INSP_RSRAQG_RGSTR_CITY( <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_CITY set DATA_STAT='9' where ID = #{id}
  119. </delete>
  120. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsraqgRgstrCity">
  121. update BIS_INSP_RSRAQG_RGSTR_CITY set DATA_STAT='9' <include refid="page_where" />
  122. </delete>
  123. <update id="deleteInFlag" parameterType="java.lang.String">
  124. update BIS_INSP_RSRAQG_RGSTR_CITY set DATA_STAT = '9' where ID = #{id}
  125. </update>
  126. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsraqgRgstrCity">
  127. update BIS_INSP_RSRAQG_RGSTR_CITY
  128. <trim prefix="set" suffixOverrides=",">
  129. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  130. <if test="tolamruutjtcosarwPoints != null">TOLAMRUUTJTCOSARW_POINTS = #{tolamruutjtcosarwPoints},</if>
  131. TOLAMRUUTJTCOSARW_DESC = #{tolamruutjtcosarwDesc},
  132. <if test="tcttosolamrPoints != null">TCTTOSOLAMR_POINTS = #{tcttosolamrPoints},</if>
  133. TCTTOSOLAMR_DESC = #{tcttosolamrDesc},
  134. <if test="solamrftipspPoints != null">SOLAMRFTIPSP_POINTS = #{solamrftipspPoints},</if>
  135. SOLAMRFTIPSP_DESC = #{solamrftipspDesc},
  136. <if test="tgaucrsarwPoints != null">TGAUCRSARW_POINTS = #{tgaucrsarwPoints},</if>
  137. TGAUCRSARW_DESC = #{tgaucrsarwDesc},
  138. <if test="cwplrsPoints != null">CWPLRS_POINTS = #{cwplrsPoints},</if>
  139. CWPLRS_DESC = #{cwplrsDesc},
  140. <if test="tstswolamrwtjPoints != null">TSTSWOLAMRWTJ_POINTS = #{tstswolamrwtjPoints},</if>
  141. TSTSWOLAMRWTJ_DESC = #{tstswolamrwtjDesc},
  142. <if test="totSco != null">TOT_SCO = #{totSco},</if>
  143. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  144. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  145. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  146. <if test="intm != null">INTM = #{intm},</if>
  147. <if test="uptm != null">UPTM = #{uptm},</if>
  148. <if test="status != null and status != ''">STATUS = #{status},</if>
  149. </trim>
  150. <where>ID = #{id}</where>
  151. </update>
  152. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsraqgRgstrCity">
  153. update BIS_INSP_RSRAQG_RGSTR_CITY
  154. <trim prefix="set" suffixOverrides=",">
  155. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  156. <if test="tolamruutjtcosarwPoints != null">TOLAMRUUTJTCOSARW_POINTS = #{tolamruutjtcosarwPoints},</if>
  157. TOLAMRUUTJTCOSARW_DESC = #{tolamruutjtcosarwDesc},
  158. <if test="tcttosolamrPoints != null">TCTTOSOLAMR_POINTS = #{tcttosolamrPoints},</if>
  159. TCTTOSOLAMR_DESC = #{tcttosolamrDesc},
  160. <if test="solamrftipspPoints != null">SOLAMRFTIPSP_POINTS = #{solamrftipspPoints},</if>
  161. SOLAMRFTIPSP_DESC = #{solamrftipspDesc},
  162. <if test="tgaucrsarwPoints != null">TGAUCRSARW_POINTS = #{tgaucrsarwPoints},</if>
  163. TGAUCRSARW_DESC = #{tgaucrsarwDesc},
  164. <if test="cwplrsPoints != null">CWPLRS_POINTS = #{cwplrsPoints},</if>
  165. CWPLRS_DESC = #{cwplrsDesc},
  166. <if test="tstswolamrwtjPoints != null">TSTSWOLAMRWTJ_POINTS = #{tstswolamrwtjPoints},</if>
  167. TSTSWOLAMRWTJ_DESC = #{tstswolamrwtjDesc},
  168. <if test="totSco != null">TOT_SCO = #{totSco},</if>
  169. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  170. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  171. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  172. <if test="intm != null">INTM = #{intm},</if>
  173. <if test="uptm != null">UPTM = #{uptm},</if>
  174. <if test="status != null and status != ''">STATUS = #{status},</if>
  175. </trim>
  176. <include refid="page_where" />
  177. </update>
  178. <!-- 其他自定义SQL -->
  179. </mapper>