CzrkMapper.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.boman.web.core.mapper.CzrkMapper">
  6. <resultMap type="com.boman.domain.Czrk" id="CzrkResult">
  7. <result property="id" column="id" />
  8. <result property="userName" column="user_name" />
  9. <result property="gender" column="gender" />
  10. <result property="age" column="age" />
  11. <result property="birthday" column="birthday" />
  12. <result property="idCard" column="id_card" />
  13. <result property="phoneNum" column="phone_num" />
  14. <result property="code" column="code" />
  15. <result property="houseType" column="house_type" />
  16. <result property="rlr" column="rlr" />
  17. <result property="rlTime" column="rl_time" />
  18. <result property="yhzgx" column="yhzgx" />
  19. <result property="workUnit" column="work_unit" />
  20. <result property="provinceId" column="province_id" />
  21. <result property="province" column="province" />
  22. <result property="cityId" column="city_id" />
  23. <result property="city" column="city" />
  24. <result property="regionId" column="region_id" />
  25. <result property="region" column="region" />
  26. <result property="villageTownsId" column="village_towns_id" />
  27. <result property="villageTowns" column="village_towns" />
  28. <result property="villageId" column="village_id" />
  29. <result property="village" column="village" />
  30. <result property="villagerGroupId" column="villager_group_id" />
  31. <result property="villagerGroup" column="villager_group" />
  32. <result property="nowIn" column="now_in" />
  33. <result property="remark" column="remark" />
  34. <result property="status" column="status" />
  35. <result property="createBy" column="create_by" />
  36. <result property="createTime" column="create_time" />
  37. <result property="updateBy" column="update_by" />
  38. <result property="updateTime" column="update_time" />
  39. <result property="isDel" column="is_del" />
  40. <result property="deleteReason" column="delete_reason" />
  41. </resultMap>
  42. <sql id="selectCzrkVo">
  43. select id, user_name, gender, age, birthday, id_card, phone_num, code, house_type, rlr, rl_time, yhzgx
  44. , work_unit, province_id, province, city_id, city, region_id, region, village_towns_id, village_towns
  45. , village_id, village, villager_group_id, villager_group, now_in, remark, status, create_by, create_time
  46. , update_by, update_time, is_del, delete_reason, dept_id, is_rl from czrk
  47. </sql>
  48. <select id="listByRlry" resultMap="CzrkResult">
  49. select id, user_name, phone_num, id_card, gender, province, city, region
  50. , house_type, update_by, code, rlr, update_time, delete_reason, now_in
  51. from czrk
  52. <where>
  53. <!-- 已认领 -->
  54. <if test="isRl != null and isRl != ''">and is_rl = #{isRl}</if>
  55. <if test="userName != null and userName != ''">
  56. and (user_name like concat('%', #{userName}, '%') or id_card like concat('%', #{userName}, '%'))
  57. </if>
  58. <if test="params.startAge != null and params.startAge != ''">and age &gt;= #{params.startAge}</if>
  59. <if test="params.endAge != null and params.endAge != ''">and age &lt;= #{params.endAge}</if>
  60. <if test="gender != null and gender != ''"> and gender = #{gender}</if>
  61. <if test="age != null "> and age = #{age}</if>
  62. <if test="birthday != null "> and birthday = #{birthday}</if>
  63. <if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
  64. <if test="phoneNum != null and phoneNum != ''"> and phone_num = #{phoneNum}</if>
  65. <if test="code != null and code != ''"> and code = #{code}</if>
  66. <if test="houseType != null and houseType != ''"> and house_type = #{houseType}</if>
  67. <if test="rlr != null and rlr != ''"> and rlr = #{rlr}</if>
  68. <if test="rlTime != null "> and rl_time = #{rlTime}</if>
  69. <if test="yhzgx != null and yhzgx != ''"> and yhzgx = #{yhzgx}</if>
  70. <if test="workUnit != null and workUnit != ''"> and work_unit = #{workUnit}</if>
  71. <if test="provinceId != null and provinceId != ''"> and province_id = #{provinceId}</if>
  72. <if test="province != null and province != ''"> and province = #{province}</if>
  73. <if test="cityId != null and cityId != ''"> and city_id = #{cityId}</if>
  74. <if test="city != null and city != ''"> and city = #{city}</if>
  75. <if test="regionId != null and regionId != ''"> and region_id = #{regionId}</if>
  76. <if test="region != null and region != ''"> and region = #{region}</if>
  77. <if test="villageTownsId != null and villageTownsId != ''"> and village_towns_id = #{villageTownsId}</if>
  78. <if test="villageTowns != null and villageTowns != ''"> and village_towns = #{villageTowns}</if>
  79. <if test="villageId != null and villageId != ''"> and village_id = #{villageId}</if>
  80. <if test="village != null and village != ''"> and village = #{village}</if>
  81. <if test="villagerGroupId != null and villagerGroupId != ''"> and villager_group_id = #{villagerGroupId}</if>
  82. <if test="villagerGroup != null and villagerGroup != ''"> and villager_group = #{villagerGroup}</if>
  83. <if test="nowIn != null and nowIn != ''"> and now_in = #{nowIn}</if>
  84. <if test="status != null and status != ''"> and status = #{status}</if>
  85. <if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
  86. <if test="deleteReason != null and deleteReason != ''"> and delete_reason = #{deleteReason}</if>
  87. <if test="deptIdList != null and deptIdList.size() > 0">
  88. and vi.dept_id in
  89. <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">
  90. #{deptId}
  91. </foreach>
  92. </if>
  93. </where>
  94. order by create_time DESC
  95. </select>
  96. <select id="listByXz" resultMap="CzrkResult">
  97. select vi.id, vi.create_time, vi.update_time, vi.is_del, vi.update_by, vi.user_name, vi.phone_num, vi.id_card
  98. , vi.gender, vi.province, vi.city, vi.region, vi.now_in, vi.house_type, vi.update_by, vi.code
  99. from czrk vi
  100. where vi.is_del = 'N' and vi.create_time &gt;= #{startTime} and vi.create_time &lt;= #{endTime}
  101. <if test="userName != null and userName != ''">
  102. and (vi.user_name like concat('%', #{userName}, '%') or vi.id_card like concat('%', #{userName}, '%'))
  103. </if>
  104. <if test="villageTowns != null and villageTowns != ''">
  105. and vi.village_towns = #{villageTowns}
  106. </if>
  107. <if test="village != null and village != ''"> and vi.village = #{village}</if>
  108. <if test="villagerGroup != null and villagerGroup != ''"> and vi.villager_group = #{villagerGroup}</if>
  109. <if test="houseType != null and houseType != ''"> and vi.house_type = #{houseType}</if>
  110. <if test="province != null and province != ''"> and vi.province = #{province}</if>
  111. <if test="city != null and city != ''"> and vi.city = #{city}</if>
  112. <if test="region != null and region != ''"> and vi.region = #{region}</if>
  113. <if test="gender != null and gender != ''"> and vi.gender = #{gender}</if>
  114. <if test="idCard != null and idCard != ''"> and vi.id_card like concat('%', #{idCard}, '%')</if>
  115. <if test="phoneNum != null and phoneNum != ''"> and vi.phone_num = #{phoneNum}</if>
  116. <if test="params.startAge != null and params.startAge != ''"> and vi.age &gt;= #{params.startAge}</if>
  117. <if test="params.endAge != null and params.endAge != ''"> and vi.age &lt;= #{params.endAge}</if>
  118. <if test="status != null and status != ''"> and vi.status = #{status}</if>
  119. <if test="code != null and code != ''"> and vi.code = #{code}</if>
  120. <if test="birthday != null and birthday != ''"> and vi.birthday = #{birthday}</if>
  121. <if test="workUnit != null and workUnit != ''"> and vi.work_unit = #{workUnit}</if>
  122. <if test="nowIn != null and nowIn != ''"> and vi.now_in = #{nowIn}</if>
  123. <if test="deptIdList != null and deptIdList.size() > 0">
  124. and vi.dept_id in
  125. <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">
  126. #{deptId}
  127. </foreach>
  128. </if>
  129. </select>
  130. <select id="countByXz" resultType="int">
  131. select count(1)
  132. from czrk vi
  133. where vi.is_del = 'N' and vi.create_time &gt;= #{startTime} and vi.create_time &lt;= #{endTime}
  134. <if test="villageTowns != null and villageTowns != ''">
  135. and vi.village_towns = #{villageTowns}
  136. </if>
  137. <if test="village != null and village != ''"> and vi.village = #{village}</if>
  138. <if test="villagerGroup != null and villagerGroup != ''"> and vi.villager_group = #{villagerGroup}</if>
  139. <if test="houseType != null and houseType != ''"> and vi.house_type = #{houseType}</if>
  140. <if test="province != null and province != ''"> and vi.province = #{province}</if>
  141. <if test="city != null and city != ''"> and vi.city = #{city}</if>
  142. <if test="region != null and region != ''"> and vi.region = #{region}</if>
  143. <if test="userName != null and userName != ''"> and vi.user_name like concat('%', #{userName}, '%')</if>
  144. <if test="gender != null and gender != ''"> and vi.gender = #{gender}</if>
  145. <if test="idCard != null and idCard != ''"> and vi.id_card like concat('%', #{idCard}, '%')</if>
  146. <if test="phoneNum != null and phoneNum != ''"> and vi.phone_num = #{phoneNum}</if>
  147. <if test="params.startAge != null and params.startAge != ''"> and vi.age &gt;= #{params.startAge}</if>
  148. <if test="params.endAge != null and params.endAge != ''"> and vi.age &lt;= #{params.endAge}</if>
  149. <if test="status != null and status != ''"> and vi.status = #{status}</if>
  150. <if test="code != null and code != ''"> and vi.code = #{code}</if>
  151. <if test="birthday != null and birthday != ''"> and vi.birthday = #{birthday}</if>
  152. <if test="workUnit != null and workUnit != ''"> and vi.work_unit = #{workUnit}</if>
  153. <if test="nowIn != null and nowIn != ''"> and vi.now_in = #{nowIn}</if>
  154. <if test="deptIdList != null and deptIdList.size() > 0">
  155. and vi.dept_id in
  156. <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">
  157. #{deptId}
  158. </foreach>
  159. </if>
  160. </select>
  161. <select id="listByJs" resultMap="CzrkResult">
  162. select vi.id, vi.create_time, vi.update_time, vi.is_del, vi.update_by, vi.user_name, vi.phone_num, vi.id_card
  163. , vi.gender, vi.province, vi.city, vi.region, vi.now_in, vi.house_type, vi.update_by, vi.code
  164. from czrk vi
  165. where vi.is_del = 'Y' and vi.update_time &gt;= #{startTime} and vi.update_time &lt;= #{endTime}
  166. <if test="userName != null and userName != ''">
  167. and (vi.user_name like concat('%', #{userName}, '%') or vi.id_card like concat('%', #{userName}, '%'))
  168. </if>
  169. <if test="villageTowns != null and villageTowns != ''">
  170. and vi.village_towns = #{villageTowns}
  171. </if>
  172. <if test="village != null and village != ''"> and vi.village = #{village}</if>
  173. <if test="villagerGroup != null and villagerGroup != ''"> and vi.villager_group = #{villagerGroup}</if>
  174. <if test="houseType != null and houseType != ''"> and vi.house_type = #{houseType}</if>
  175. <if test="province != null and province != ''"> and vi.province = #{province}</if>
  176. <if test="city != null and city != ''"> and vi.city = #{city}</if>
  177. <if test="region != null and region != ''"> and vi.region = #{region}</if>
  178. <if test="userName != null and userName != ''"> and vi.user_name like concat('%', #{userName}, '%')</if>
  179. <if test="gender != null and gender != ''"> and vi.gender = #{gender}</if>
  180. <if test="idCard != null and idCard != ''"> and vi.id_card like concat('%', #{idCard}, '%')</if>
  181. <if test="phoneNum != null and phoneNum != ''"> and vi.phone_num = #{phoneNum}</if>
  182. <if test="params.startAge != null and params.startAge != ''"> and vi.age &gt;= #{params.startAge}</if>
  183. <if test="params.endAge != null and params.endAge != ''"> and vi.age &lt;= #{params.endAge}</if>
  184. <if test="status != null and status != ''"> and vi.status = #{status}</if>
  185. <if test="code != null and code != ''"> and vi.code = #{code}</if>
  186. <if test="birthday != null and birthday != ''"> and vi.birthday = #{birthday}</if>
  187. <if test="workUnit != null and workUnit != ''"> and vi.work_unit = #{workUnit}</if>
  188. <if test="nowIn != null and nowIn != ''"> and vi.now_in = #{nowIn}</if>
  189. <if test="deptIdList != null and deptIdList.size() > 0">
  190. and vi.dept_id in
  191. <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">
  192. #{deptId}
  193. </foreach>
  194. </if>
  195. </select>
  196. <select id="countByJs" resultType="int">
  197. select count(1)
  198. from czrk vi
  199. where vi.is_del = 'Y' and vi.update_time &gt;= #{startTime} and vi.update_time &lt;= #{endTime}
  200. <if test="villageTowns != null and villageTowns != ''">
  201. and vi.village_towns = #{villageTowns}
  202. </if>
  203. <if test="village != null and village != ''"> and vi.village = #{village}</if>
  204. <if test="villagerGroup != null and villagerGroup != ''"> and vi.villager_group = #{villagerGroup}</if>
  205. <if test="houseType != null and houseType != ''"> and vi.house_type = #{houseType}</if>
  206. <if test="province != null and province != ''"> and vi.province = #{province}</if>
  207. <if test="city != null and city != ''"> and vi.city = #{city}</if>
  208. <if test="region != null and region != ''"> and vi.region = #{region}</if>
  209. <if test="userName != null and userName != ''"> and vi.user_name like concat('%', #{userName}, '%')</if>
  210. <if test="gender != null and gender != ''"> and vi.gender = #{gender}</if>
  211. <if test="idCard != null and idCard != ''"> and vi.id_card like concat('%', #{idCard}, '%')</if>
  212. <if test="phoneNum != null and phoneNum != ''"> and vi.phone_num = #{phoneNum}</if>
  213. <if test="params.startAge != null and params.startAge != ''"> and vi.age &gt;= #{params.startAge}</if>
  214. <if test="params.endAge != null and params.endAge != ''"> and vi.age &lt;= #{params.endAge}</if>
  215. <if test="status != null and status != ''"> and vi.status = #{status}</if>
  216. <if test="code != null and code != ''"> and vi.code = #{code}</if>
  217. <if test="birthday != null and birthday != ''"> and vi.birthday = #{birthday}</if>
  218. <if test="workUnit != null and workUnit != ''"> and vi.work_unit = #{workUnit}</if>
  219. <if test="nowIn != null and nowIn != ''"> and vi.now_in = #{nowIn}</if>
  220. <if test="deptIdList != null and deptIdList.size() > 0">
  221. and vi.dept_id in
  222. <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">
  223. #{deptId}
  224. </foreach>
  225. </if>
  226. </select>
  227. <select id="listByCode" resultMap="CzrkResult">
  228. select vi.id, vi.user_name, vi.phone_num, vi.id_card, vi.gender, vi.province, vi.city, vi.region, vi.now_in
  229. , vi.house_type, vi.update_by, vi.code, vi.rlr, vi.yhzgx
  230. from czrk vi
  231. <!--把户主放第一位-->
  232. where vi.is_del = 'N' and code = #{code} order by house_type desc;
  233. </select>
  234. <select id="countCzrk" resultType="int">
  235. select count(vi.id)
  236. from czrk vi
  237. where vi.is_del = 'N'
  238. <!-- 不关心是否认领 -->
  239. <if test="deptIdList != null and deptIdList.size() > 0">
  240. and vi.dept_id in
  241. <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">
  242. #{deptId}
  243. </foreach>
  244. </if>
  245. </select>
  246. <select id="selectCzrkById" parameterType="Long" resultMap="CzrkResult">
  247. <include refid="selectCzrkVo"/>
  248. where id = #{id} limit 1
  249. </select>
  250. <select id="countIdCard" resultType="int">
  251. select count(vi.id) from czrk vi where vi.is_del = 'N' and id_card = #{idCard}
  252. </select>
  253. <select id="stsByYrl" resultType="int">
  254. select count(vi.id)
  255. from czrk vi
  256. where vi.is_del = 'N'
  257. <!-- 已认领 -->
  258. and vi.is_rl = '是'
  259. <if test="userName != null and userName != ''">
  260. and (vi.user_name like concat('%', #{userName}, '%') or vi.id_card like concat('%', #{userName}, '%'))
  261. </if>
  262. <if test="deptIdList != null and deptIdList.size() > 0">
  263. and vi.dept_id in
  264. <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">
  265. #{deptId}
  266. </foreach>
  267. </if>
  268. </select>
  269. <select id="stsByWrl" resultType="int">
  270. select count(vi.id)
  271. from czrk vi
  272. where vi.is_del = 'N'
  273. <!-- 未认领 -->
  274. and vi.is_rl = '否'
  275. <if test="userName != null and userName != ''">
  276. and (vi.user_name like concat('%', #{userName}, '%') or vi.id_card like concat('%', #{userName}, '%'))
  277. </if>
  278. <if test="deptIdList != null and deptIdList.size() > 0">
  279. and vi.dept_id in
  280. <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")">
  281. #{deptId}
  282. </foreach>
  283. </if>
  284. </select>
  285. <insert id="insertCzrk" useGeneratedKeys="true" keyProperty="id">
  286. insert into czrk
  287. <trim prefix="(" suffix=")" suffixOverrides=",">
  288. <if test="userName != null">user_name,</if>
  289. <if test="gender != null">gender,</if>
  290. <if test="age != null">age,</if>
  291. <if test="birthday != null">birthday,</if>
  292. <if test="idCard != null">id_card,</if>
  293. <if test="phoneNum != null">phone_num,</if>
  294. <if test="code != null">code,</if>
  295. <if test="houseType != null">house_type,</if>
  296. <if test="rlr != null">rlr,</if>
  297. <if test="rlTime != null">rl_time,</if>
  298. <if test="yhzgx != null">yhzgx,</if>
  299. <if test="workUnit != null">work_unit,</if>
  300. <if test="provinceId != null">province_id,</if>
  301. <if test="province != null">province,</if>
  302. <if test="cityId != null">city_id,</if>
  303. <if test="city != null">city,</if>
  304. <if test="regionId != null">region_id,</if>
  305. <if test="region != null">region,</if>
  306. <if test="villageTownsId != null">village_towns_id,</if>
  307. <if test="villageTowns != null">village_towns,</if>
  308. <if test="villageId != null">village_id,</if>
  309. <if test="village != null">village,</if>
  310. <if test="villagerGroupId != null">villager_group_id,</if>
  311. <if test="villagerGroup != null">villager_group,</if>
  312. <if test="nowIn != null">now_in,</if>
  313. <if test="remark != null">remark,</if>
  314. <if test="status != null">status,</if>
  315. <if test="createBy != null">create_by,</if>
  316. <if test="updateBy != null">update_by,</if>
  317. <if test="isDel != null and isDel != ''">is_del,</if>
  318. <if test="deleteReason != null">delete_reason,</if>
  319. create_time, updateTime
  320. </trim>
  321. <trim prefix="values (" suffix=")" suffixOverrides=",">
  322. <if test="userName != null">#{userName},</if>
  323. <if test="gender != null">#{gender},</if>
  324. <if test="age != null">#{age},</if>
  325. <if test="birthday != null">#{birthday},</if>
  326. <if test="idCard != null">#{idCard},</if>
  327. <if test="phoneNum != null">#{phoneNum},</if>
  328. <if test="code != null">#{code},</if>
  329. <if test="houseType != null">#{houseType},</if>
  330. <if test="rlr != null">#{rlr},</if>
  331. <if test="rlTime != null">#{rlTime},</if>
  332. <if test="yhzgx != null">#{yhzgx},</if>
  333. <if test="workUnit != null">#{workUnit},</if>
  334. <if test="provinceId != null">#{provinceId},</if>
  335. <if test="province != null">#{province},</if>
  336. <if test="cityId != null">#{cityId},</if>
  337. <if test="city != null">#{city},</if>
  338. <if test="regionId != null">#{regionId},</if>
  339. <if test="region != null">#{region},</if>
  340. <if test="villageTownsId != null">#{villageTownsId},</if>
  341. <if test="villageTowns != null">#{villageTowns},</if>
  342. <if test="villageId != null">#{villageId},</if>
  343. <if test="village != null">#{village},</if>
  344. <if test="villagerGroupId != null">#{villagerGroupId},</if>
  345. <if test="villagerGroup != null">#{villagerGroup},</if>
  346. <if test="nowIn != null">#{nowIn},</if>
  347. <if test="remark != null">#{remark},</if>
  348. <if test="status != null">#{status},</if>
  349. <if test="createBy != null">#{createBy},</if>
  350. <if test="updateBy != null">#{updateBy},</if>
  351. <if test="isDel != null and isDel != ''">#{isDel},</if>
  352. <if test="deleteReason != null">#{deleteReason},</if>
  353. sysdate(), sysdate()
  354. </trim>
  355. </insert>
  356. <update id="updateCzrk" >
  357. update czrk
  358. <trim prefix="SET" suffixOverrides=",">
  359. <if test="userName != null">user_name = #{userName},</if>
  360. <if test="gender != null">gender = #{gender},</if>
  361. <if test="age != null">age = #{age},</if>
  362. <if test="birthday != null">birthday = #{birthday},</if>
  363. <if test="idCard != null">id_card = #{idCard},</if>
  364. <if test="phoneNum != null">phone_num = #{phoneNum},</if>
  365. <if test="code != null">code = #{code},</if>
  366. <if test="houseType != null">house_type = #{houseType},</if>
  367. <if test="rlr != null">rlr = #{rlr},</if>
  368. <if test="rlTime != null">rl_time = #{rlTime},</if>
  369. <if test="yhzgx != null">yhzgx = #{yhzgx},</if>
  370. <if test="workUnit != null">work_unit = #{workUnit},</if>
  371. <if test="provinceId != null">province_id = #{provinceId},</if>
  372. <if test="province != null">province = #{province},</if>
  373. <if test="cityId != null">city_id = #{cityId},</if>
  374. <if test="city != null">city = #{city},</if>
  375. <if test="regionId != null">region_id = #{regionId},</if>
  376. <if test="region != null">region = #{region},</if>
  377. <if test="villageTownsId != null">village_towns_id = #{villageTownsId},</if>
  378. <if test="villageTowns != null">village_towns = #{villageTowns},</if>
  379. <if test="villageId != null">village_id = #{villageId},</if>
  380. <if test="village != null">village = #{village},</if>
  381. <if test="villagerGroupId != null">villager_group_id = #{villagerGroupId},</if>
  382. <if test="villagerGroup != null">villager_group = #{villagerGroup},</if>
  383. <if test="nowIn != null">now_in = #{nowIn},</if>
  384. <if test="remark != null">remark = #{remark},</if>
  385. <if test="status != null">status = #{status},</if>
  386. <if test="createBy != null">create_by = #{createBy},</if>
  387. <if test="createTime != null">create_time = #{createTime},</if>
  388. <if test="updateBy != null">update_by = #{updateBy},</if>
  389. <if test="updateTime != null">update_time = sysdate(),</if>
  390. <if test="isDel != null and isDel != ''">is_del = #{isDel},</if>
  391. <if test="deleteReason != null">delete_reason = #{deleteReason},</if>
  392. </trim>
  393. where id = #{id}
  394. </update>
  395. <delete id="deleteCzrkById" parameterType="Long">
  396. delete from czrk where id = #{id}
  397. </delete>
  398. <update id="reduction">
  399. update czrk
  400. set is_del = 'N'
  401. , update_by = #{updateBy}
  402. , update_time = sysdate()
  403. where id = #{id}
  404. </update>
  405. <!-- <delete id="deleteCzrk" parameterType="String">-->
  406. <!-- delete from czrk where id in -->
  407. <!-- <foreach item="id" collection="array" open="(" separator="," close=")">-->
  408. <!-- #{id}-->
  409. <!-- </foreach>-->
  410. <!-- </delete>-->
  411. <update id="deleteCzrk">
  412. update czrk
  413. set is_del = 'Y'
  414. , delete_reason = #{deleteReason}
  415. , update_by = #{updateBy}
  416. , update_time = sysdate()
  417. where id = #{id}
  418. </update>
  419. </mapper>