BisInspVillqhPoorDao.xml 10 KB

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