BisNewCountryLawDao.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  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.BisNewCountryLawDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisNewCountryLaw" id="bisNewCountryLawResultMap">
  5. <result property="zcBuzhuFilenum" column="ZC_BUZHU_FILENUM"/>
  6. <result property="zcBuzhuDepart" column="ZC_BUZHU_DEPART"/>
  7. <result property="zcBuzhuTime" column="ZC_BUZHU_TIME"/>
  8. <result property="zcBuzhuNote" column="ZC_BUZHU_NOTE"/>
  9. <result property="zcOtherIsMake" column="ZC_OTHER_IS_MAKE"/>
  10. <result property="zcOtherIsFilename" column="ZC_OTHER_IS_FILENAME"/>
  11. <result property="zcOtherIsFilenum" column="ZC_OTHER_IS_FILENUM"/>
  12. <result property="zcOtherIsDepart" column="ZC_OTHER_IS_DEPART"/>
  13. <result property="zcOtherIsTime" column="ZC_OTHER_IS_TIME"/>
  14. <result property="zcOtherIsNote" column="ZC_OTHER_IS_NOTE"/>
  15. <result property="visitDate" column="VISIT_DATE"/>
  16. <result property="persId" column="PERS_ID"/>
  17. <result property="recPers2" column="REC_PERS2"/>
  18. <result property="createTime" column="CREATE_TIME"/>
  19. <result property="updateTime" column="UPDATE_TIME"/>
  20. <result property="status" column="STATUS"/>
  21. <result property="visiteNote" column="VISITE_NOTE"/>
  22. <result property="id" column="ID"/>
  23. <result property="villageNm" column="VILLAGE_NM"/>
  24. <result property="regstrId" column="REGSTR_ID"/>
  25. <result property="adCode" column="AD_CODE"/>
  26. <result property="telphone" column="TELPHONE"/>
  27. <result property="isPkx" column="IS_PKX"/>
  28. <result property="isTelNormal" column="IS_TEL_NORMAL"/>
  29. <result property="zcWaterFilename" column="ZC_WATER_FILENAME"/>
  30. <result property="zcWaterFilenum" column="ZC_WATER_FILENUM"/>
  31. <result property="zcWaterDepart" column="ZC_WATER_DEPART"/>
  32. <result property="zcWaterTime" column="ZC_WATER_TIME"/>
  33. <result property="zcWaterNote" column="ZC_WATER_NOTE"/>
  34. <result property="zcWaterIsMake" column="ZC_WATER_IS_MAKE"/>
  35. <result property="zcBuzhuIsMake" column="ZC_BUZHU_IS_MAKE"/>
  36. <result property="zcBuzhuFilename" column="ZC_BUZHU_FILENAME"/>
  37. <result property="isFoOver" column="IS_FO_OVER"/>
  38. </resultMap>
  39. <sql id="table_columns">
  40. ZC_BUZHU_FILENUM,IS_FO_OVER,
  41. ZC_BUZHU_DEPART,
  42. ZC_BUZHU_TIME,
  43. ZC_BUZHU_NOTE,
  44. ZC_OTHER_IS_MAKE,
  45. ZC_OTHER_IS_FILENAME,
  46. ZC_OTHER_IS_FILENUM,
  47. ZC_OTHER_IS_DEPART,
  48. ZC_OTHER_IS_TIME,
  49. ZC_OTHER_IS_NOTE,
  50. VISIT_DATE,
  51. PERS_ID,
  52. REC_PERS2,
  53. CREATE_TIME,
  54. UPDATE_TIME,
  55. STATUS,
  56. VISITE_NOTE,
  57. ID,
  58. VILLAGE_NM,
  59. REGSTR_ID,
  60. AD_CODE,
  61. TELPHONE,
  62. IS_PKX,
  63. IS_TEL_NORMAL,
  64. ZC_WATER_FILENAME,
  65. ZC_WATER_FILENUM,
  66. ZC_WATER_DEPART,
  67. ZC_WATER_TIME,
  68. ZC_WATER_NOTE,
  69. ZC_WATER_IS_MAKE,
  70. ZC_BUZHU_IS_MAKE,
  71. ZC_BUZHU_FILENAME
  72. </sql>
  73. <sql id="entity_properties">
  74. #{zcBuzhuFilenum},#{isFoOver},
  75. #{zcBuzhuDepart},
  76. #{zcBuzhuTime},
  77. #{zcBuzhuNote},
  78. #{zcOtherIsMake},
  79. #{zcOtherIsFilename},
  80. #{zcOtherIsFilenum},
  81. #{zcOtherIsDepart},
  82. #{zcOtherIsTime},
  83. #{zcOtherIsNote},
  84. #{visitDate},
  85. #{persId},
  86. #{recPers2},
  87. #{createTime},
  88. #{updateTime},
  89. #{status},
  90. #{visiteNote},
  91. #{id},
  92. #{villageNm},
  93. #{regstrId},
  94. #{adCode},
  95. #{telphone},
  96. #{isPkx},
  97. #{isTelNormal},
  98. #{zcWaterFilename},
  99. #{zcWaterFilenum},
  100. #{zcWaterDepart},
  101. #{zcWaterTime},
  102. #{zcWaterNote},
  103. #{zcWaterIsMake},
  104. #{zcBuzhuIsMake},
  105. #{zcBuzhuFilename}
  106. </sql>
  107. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  108. <sql id="page_where">
  109. <trim prefix="where" prefixOverrides="and | or ">
  110. <if test="zcBuzhuDepart != null and zcBuzhuDepart != ''">and ZC_BUZHU_DEPART = #{zcBuzhuDepart}</if>
  111. <if test="zcBuzhuTime != null and zcBuzhuTime != ''">and ZC_BUZHU_TIME = #{zcBuzhuTime}</if>
  112. <if test="zcBuzhuNote != null and zcBuzhuNote != ''">and ZC_BUZHU_NOTE = #{zcBuzhuNote}</if>
  113. <if test="zcOtherIsMake != null and zcOtherIsMake != ''">and ZC_OTHER_IS_MAKE = #{zcOtherIsMake}</if>
  114. <if test="zcOtherIsFilename != null and zcOtherIsFilename != ''">and ZC_OTHER_IS_FILENAME = #{zcOtherIsFilename}</if>
  115. <if test="zcOtherIsFilenum != null and zcOtherIsFilenum != ''">and ZC_OTHER_IS_FILENUM = #{zcOtherIsFilenum}</if>
  116. <if test="zcOtherIsDepart != null and zcOtherIsDepart != ''">and ZC_OTHER_IS_DEPART = #{zcOtherIsDepart}</if>
  117. <if test="zcOtherIsTime != null and zcOtherIsTime != ''">and ZC_OTHER_IS_TIME = #{zcOtherIsTime}</if>
  118. <if test="zcOtherIsNote != null and zcOtherIsNote != ''">and ZC_OTHER_IS_NOTE = #{zcOtherIsNote}</if>
  119. <if test="visitDate != null and visitDate != ''">and VISIT_DATE = #{visitDate}</if>
  120. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  121. <if test="recPers2 != null and recPers2 != ''">and REC_PERS2 = #{recPers2}</if>
  122. <if test="createTime != null">and CREATE_TIME = #{createTime}</if>
  123. <if test="updateTime != null">and UPDATE_TIME = #{updateTime}</if>
  124. <if test="status != null and status != ''">and STATUS = #{status}</if>
  125. <if test="visiteNote != null and visiteNote != ''">and VISITE_NOTE = #{visiteNote}</if>
  126. <if test="id != null and id != ''">and ID = #{id}</if>
  127. <if test="villageNm != null and villageNm != ''">and VILLAGE_NM = #{villageNm}</if>
  128. <if test="regstrId != null and regstrId != ''">and REGSTR_ID = #{regstrId}</if>
  129. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  130. <if test="telphone != null and telphone != ''">and TELPHONE = #{telphone}</if>
  131. <if test="isPkx != null and isPkx != ''">and IS_PKX = #{isPkx}</if>
  132. <if test="isFoOver != null and isFoOver != ''">and IS_FO_OVER = #{isFoOver}</if>
  133. <if test="isTelNormal != null and isTelNormal != ''">and IS_TEL_NORMAL = #{isTelNormal}</if>
  134. <if test="zcWaterFilename != null and zcWaterFilename != ''">and ZC_WATER_FILENAME = #{zcWaterFilename}</if>
  135. <if test="zcWaterFilenum != null and zcWaterFilenum != ''">and ZC_WATER_FILENUM = #{zcWaterFilenum}</if>
  136. <if test="zcWaterDepart != null and zcWaterDepart != ''">and ZC_WATER_DEPART = #{zcWaterDepart}</if>
  137. <if test="zcWaterTime != null and zcWaterTime != ''">and ZC_WATER_TIME = #{zcWaterTime}</if>
  138. <if test="zcWaterNote != null and zcWaterNote != ''">and ZC_WATER_NOTE = #{zcWaterNote}</if>
  139. <if test="zcWaterIsMake != null and zcWaterIsMake != ''">and ZC_WATER_IS_MAKE = #{zcWaterIsMake}</if>
  140. <if test="zcBuzhuIsMake != null and zcBuzhuIsMake != ''">and ZC_BUZHU_IS_MAKE = #{zcBuzhuIsMake}</if>
  141. <if test="zcBuzhuFilename != null and zcBuzhuFilename != ''">and ZC_BUZHU_FILENAME = #{zcBuzhuFilename}</if>
  142. </trim>
  143. </sql>
  144. <select id="get" resultMap="bisNewCountryLawResultMap" parameterType="String" >
  145. select <include refid="table_columns" /> from BIS_NEW_COUNTRY_LAW where ID = #{id}
  146. </select>
  147. <select id="getBy" resultMap="bisNewCountryLawResultMap">
  148. select <include refid="table_columns" /> from BIS_NEW_COUNTRY_LAW <include refid="page_where" />
  149. </select>
  150. <select id="findAll" resultMap="bisNewCountryLawResultMap">
  151. select <include refid="table_columns" /> from BIS_NEW_COUNTRY_LAW
  152. </select>
  153. <select id="findList" resultMap="bisNewCountryLawResultMap">
  154. select <include refid="table_columns" /> from BIS_NEW_COUNTRY_LAW <include refid="page_where" />
  155. </select>
  156. <select id="selectCount" resultType="int" >
  157. select count(ID) from BIS_NEW_COUNTRY_LAW <include refid="page_where" />
  158. </select>
  159. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisNewCountryLaw">
  160. insert into BIS_NEW_COUNTRY_LAW( <include refid="table_columns" /> )
  161. values ( <include refid="entity_properties" /> )
  162. </insert>
  163. <delete id="delete" parameterType="java.lang.String">
  164. delete from BIS_NEW_COUNTRY_LAW where ID = #{id}
  165. </delete>
  166. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisNewCountryLaw">
  167. delete from BIS_NEW_COUNTRY_LAW <include refid="page_where" />
  168. </delete>
  169. <update id="deleteInFlag" parameterType="java.lang.String">
  170. update BIS_NEW_COUNTRY_LAW set flag_valid = 0 where ID = #{id}
  171. </update>
  172. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisNewCountryLaw">
  173. update BIS_NEW_COUNTRY_LAW
  174. <trim prefix="set" suffixOverrides=",">
  175. <if test="zcBuzhuDepart != null and zcBuzhuDepart != ''">ZC_BUZHU_DEPART = #{zcBuzhuDepart},</if>
  176. <if test="zcBuzhuFilenum != null and zcBuzhuFilenum != ''">ZC_BUZHU_FILENUM = #{zcBuzhuFilenum},</if>
  177. <if test="zcBuzhuTime != null and zcBuzhuTime != ''">ZC_BUZHU_TIME = #{zcBuzhuTime},</if>
  178. <if test="zcBuzhuNote != null and zcBuzhuNote != ''">ZC_BUZHU_NOTE = #{zcBuzhuNote},</if>
  179. <if test="zcOtherIsMake != null and zcOtherIsMake != ''">ZC_OTHER_IS_MAKE = #{zcOtherIsMake},</if>
  180. <if test="zcOtherIsFilename != null and zcOtherIsFilename != ''">ZC_OTHER_IS_FILENAME = #{zcOtherIsFilename},</if>
  181. <if test="zcOtherIsFilenum != null and zcOtherIsFilenum != ''">ZC_OTHER_IS_FILENUM = #{zcOtherIsFilenum},</if>
  182. <if test="zcOtherIsDepart != null and zcOtherIsDepart != ''">ZC_OTHER_IS_DEPART = #{zcOtherIsDepart},</if>
  183. <if test="zcOtherIsTime != null and zcOtherIsTime != ''">ZC_OTHER_IS_TIME = #{zcOtherIsTime},</if>
  184. <if test="zcOtherIsNote != null and zcOtherIsNote != ''">ZC_OTHER_IS_NOTE = #{zcOtherIsNote},</if>
  185. <if test="visitDate != null and visitDate != ''">VISIT_DATE = #{visitDate},</if>
  186. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  187. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  188. <if test="createTime != null">CREATE_TIME = #{createTime},</if>
  189. <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
  190. <if test="status != null and status != ''">STATUS = #{status},</if>
  191. <if test="visiteNote != null and visiteNote != ''">VISITE_NOTE = #{visiteNote},</if>
  192. <if test="id != null and id != ''">ID = #{id},</if>
  193. <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
  194. <if test="regstrId != null and regstrId != ''">REGSTR_ID = #{regstrId},</if>
  195. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  196. <if test="telphone != null and telphone != ''">TELPHONE = #{telphone},</if>
  197. <if test="isPkx != null and isPkx != ''">IS_PKX = #{isPkx},</if>
  198. <if test="isFoOver != null and isFoOver != ''"> IS_FO_OVER = #{isFoOver},</if>
  199. <if test="isTelNormal != null and isTelNormal != ''">IS_TEL_NORMAL = #{isTelNormal},</if>
  200. <if test="zcWaterFilename != null and zcWaterFilename != ''">ZC_WATER_FILENAME = #{zcWaterFilename},</if>
  201. <if test="zcWaterFilenum != null and zcWaterFilenum != ''">ZC_WATER_FILENUM = #{zcWaterFilenum},</if>
  202. <if test="zcWaterDepart != null and zcWaterDepart != ''">ZC_WATER_DEPART = #{zcWaterDepart},</if>
  203. <if test="zcWaterTime != null and zcWaterTime != ''">ZC_WATER_TIME = #{zcWaterTime},</if>
  204. <if test="zcWaterNote != null and zcWaterNote != ''">ZC_WATER_NOTE = #{zcWaterNote},</if>
  205. <if test="zcWaterIsMake != null and zcWaterIsMake != ''">ZC_WATER_IS_MAKE = #{zcWaterIsMake},</if>
  206. <if test="zcBuzhuIsMake != null and zcBuzhuIsMake != ''">ZC_BUZHU_IS_MAKE = #{zcBuzhuIsMake},</if>
  207. <if test="zcBuzhuFilename != null and zcBuzhuFilename != ''">ZC_BUZHU_FILENAME = #{zcBuzhuFilename},</if>
  208. </trim>
  209. <where>ID = #{id}</where>
  210. </update>
  211. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisNewCountryLaw">
  212. update BIS_NEW_COUNTRY_LAW
  213. <trim prefix="set" suffixOverrides=",">
  214. <if test="zcBuzhuDepart != null and zcBuzhuDepart != ''">ZC_BUZHU_DEPART = #{zcBuzhuDepart},</if>
  215. <if test="zcBuzhuFilenum != null and zcBuzhuFilenum != ''">ZC_BUZHU_FILENUM = #{zcBuzhuFilenum},</if>
  216. <if test="zcBuzhuTime != null and zcBuzhuTime != ''">ZC_BUZHU_TIME = #{zcBuzhuTime},</if>
  217. <if test="zcBuzhuNote != null and zcBuzhuNote != ''">ZC_BUZHU_NOTE = #{zcBuzhuNote},</if>
  218. <if test="zcOtherIsMake != null and zcOtherIsMake != ''">ZC_OTHER_IS_MAKE = #{zcOtherIsMake},</if>
  219. <if test="zcOtherIsFilename != null and zcOtherIsFilename != ''">ZC_OTHER_IS_FILENAME = #{zcOtherIsFilename},</if>
  220. <if test="zcOtherIsFilenum != null and zcOtherIsFilenum != ''">ZC_OTHER_IS_FILENUM = #{zcOtherIsFilenum},</if>
  221. <if test="zcOtherIsDepart != null and zcOtherIsDepart != ''">ZC_OTHER_IS_DEPART = #{zcOtherIsDepart},</if>
  222. <if test="zcOtherIsTime != null and zcOtherIsTime != ''">ZC_OTHER_IS_TIME = #{zcOtherIsTime},</if>
  223. <if test="zcOtherIsNote != null and zcOtherIsNote != ''">ZC_OTHER_IS_NOTE = #{zcOtherIsNote},</if>
  224. <if test="visitDate != null and visitDate != ''">VISIT_DATE = #{visitDate},</if>
  225. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  226. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  227. <if test="createTime != null">CREATE_TIME = #{createTime},</if>
  228. <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
  229. <if test="status != null and status != ''">STATUS = #{status},</if>
  230. <if test="visiteNote != null and visiteNote != ''">VISITE_NOTE = #{visiteNote},</if>
  231. <if test="id != null and id != ''">ID = #{id},</if>
  232. <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
  233. <if test="regstrId != null and regstrId != ''">REGSTR_ID = #{regstrId},</if>
  234. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  235. <if test="telphone != null and telphone != ''">TELPHONE = #{telphone},</if>
  236. <if test="isPkx != null and isPkx != ''">IS_PKX = #{isPkx},</if>
  237. <if test="isTelNormal != null and isTelNormal != ''">IS_TEL_NORMAL = #{isTelNormal},</if>
  238. <if test="zcWaterFilename != null and zcWaterFilename != ''">ZC_WATER_FILENAME = #{zcWaterFilename},</if>
  239. <if test="zcWaterFilenum != null and zcWaterFilenum != ''">ZC_WATER_FILENUM = #{zcWaterFilenum},</if>
  240. <if test="zcWaterDepart != null and zcWaterDepart != ''">ZC_WATER_DEPART = #{zcWaterDepart},</if>
  241. <if test="zcWaterTime != null and zcWaterTime != ''">ZC_WATER_TIME = #{zcWaterTime},</if>
  242. <if test="zcWaterNote != null and zcWaterNote != ''">ZC_WATER_NOTE = #{zcWaterNote},</if>
  243. <if test="zcWaterIsMake != null and zcWaterIsMake != ''">ZC_WATER_IS_MAKE = #{zcWaterIsMake},</if>
  244. <if test="zcBuzhuIsMake != null and zcBuzhuIsMake != ''">ZC_BUZHU_IS_MAKE = #{zcBuzhuIsMake},</if>
  245. <if test="zcBuzhuFilename != null and zcBuzhuFilename != ''">ZC_BUZHU_FILENAME = #{zcBuzhuFilename},</if>
  246. </trim>
  247. <include refid="page_where" />
  248. </update>
  249. <!-- 其他自定义SQL -->
  250. </mapper>