QwSopMapper.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  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.fs.sop.mapper.QwSopMapper">
  6. <resultMap type="com.fs.sop.domain.QwSop" id="QwSopResult">
  7. <result property="id" column="id" />
  8. <result property="name" column="name" />
  9. <result property="status" column="status" />
  10. <result property="type" column="type" />
  11. <result property="qwUserIds" column="qw_user_ids" />
  12. <result property="createBy" column="create_by" />
  13. <result property="createTime" column="create_time" />
  14. <result property="companyId" column="company_id" />
  15. <result property="sendType" column="send_type" />
  16. <result property="tags" column="tags" />
  17. <result property="excludeTags" column="exclude_tags" />
  18. <result property="startTime" column="start_time" />
  19. <result property="filterType" column="filter_type" />
  20. <result property="tempId" column="temp_id" />
  21. <result property="corpId" column="corp_id" />
  22. <result property="expiryTime" column="expiry_time" />
  23. <result property="isAutoSop" column="is_auto_sop" />
  24. <result property="autoSopTime" column="auto_sop_time" />
  25. <result property="minConversionDay" column="min_conversion_day" />
  26. <result property="maxConversionDay" column="max_conversion_day" />
  27. <result property="minSend" column="min_send" />
  28. <result property="maxSend" column="max_send" />
  29. <result property="stopTime" column="stop_time" />
  30. <result property="isRating" column="is_rating" />
  31. <result property="courseDay" column="course_day" />
  32. <result property="openCommentStatus" column="open_comment_status" />
  33. </resultMap>
  34. <sql id="selectQwSopVo">
  35. select * from qw_sop
  36. </sql>
  37. <select id="selectQwSopAutoByTagsByForeach" resultType="com.fs.qw.vo.QwSopRuleTimeVO">
  38. SELECT
  39. qs.*,
  40. qst.name AS temp_name,
  41. qst.setting AS temp_setting,
  42. qst.status AS temp_status,
  43. qst.gap AS temp_gap,
  44. qst.sort AS temp_sort,
  45. qst.create_time AS temp_create_time,
  46. qst.create_by AS temp_create_by,
  47. qst.corp_id AS temp_company_id
  48. FROM
  49. qw_sop qs
  50. LEFT JOIN
  51. qw_sop_temp qst ON qs.temp_id = qst.id
  52. WHERE
  53. FIND_IN_SET(#{map.qwUserId}, COALESCE(qs.qw_user_ids, '')) > 0
  54. AND qs.corp_id = #{map.corpId}
  55. AND qst.status = '1'
  56. AND qs.status IN (2, 3, 4)
  57. AND qs.is_auto_sop = 1
  58. AND qs.send_type = #{map.sendType}
  59. AND (
  60. <foreach collection='map.tagsIdsSelectList' item='item' index='index' separator=' or '>
  61. find_in_set( #{item}, TRIM(REGEXP_REPLACE(qs.tags, '[\"\\\\[\\\\]]', '')))
  62. </foreach>
  63. )
  64. </select>
  65. <select id="selectQwSopAutoByTagsByForeachNotAuto" resultType="com.fs.qw.vo.QwSopRuleTimeVO">
  66. SELECT
  67. qs.*,
  68. qst.name AS temp_name,
  69. qst.setting AS temp_setting,
  70. qst.status AS temp_status,
  71. qst.gap AS temp_gap,
  72. qst.sort AS temp_sort,
  73. qst.create_time AS temp_create_time,
  74. qst.create_by AS temp_create_by,
  75. qst.corp_id AS temp_company_id
  76. FROM
  77. qw_sop qs
  78. LEFT JOIN
  79. qw_sop_temp qst ON qs.temp_id = qst.id
  80. WHERE
  81. FIND_IN_SET(#{map.qwUserId}, COALESCE(qs.qw_user_ids, '')) > 0
  82. AND qs.corp_id = #{map.corpId}
  83. AND qst.status = '1'
  84. AND qs.status IN (2, 3, 4)
  85. AND qs.send_type = #{map.sendType}
  86. AND (
  87. <foreach collection='map.tagsIdsSelectList' item='item' index='index' separator=' or '>
  88. find_in_set( #{item}, TRIM(REGEXP_REPLACE(qs.tags, '[\"\\\\[\\\\]]', '')) )
  89. </foreach>
  90. )
  91. </select>
  92. <select id="selectQwSopAutoByTagsByForeachRemoveNotAuto" resultType="com.fs.qw.vo.QwSopRuleTimeVO">
  93. SELECT
  94. qs.*,
  95. qst.name AS temp_name,
  96. qst.setting AS temp_setting,
  97. qst.status AS temp_status,
  98. qst.gap AS temp_gap,
  99. qst.sort AS temp_sort,
  100. qst.create_time AS temp_create_time,
  101. qst.create_by AS temp_create_by,
  102. qst.corp_id AS temp_company_id
  103. FROM
  104. qw_sop qs
  105. LEFT JOIN
  106. qw_sop_temp qst ON qs.temp_id = qst.id
  107. WHERE
  108. FIND_IN_SET(#{map.qwUserId}, COALESCE(qs.qw_user_ids, '')) > 0
  109. AND qs.corp_id = #{map.corpId}
  110. AND qst.status = '1'
  111. AND qs.status IN (2, 3, 4)
  112. AND qs.send_type = #{map.sendType}
  113. AND (
  114. <foreach collection='map.tagsIdsSelectList' item='item' index='index' separator=' and '>
  115. NOT find_in_set( #{item}, TRIM(REGEXP_REPLACE(qs.tags, '[\"\\\\[\\\\]]', '')) )
  116. </foreach>
  117. )
  118. </select>
  119. <select id="selectQwAiSopAutoByTagsByForeach" resultType="com.fs.qw.vo.QwSopRuleTimeVO">
  120. SELECT
  121. qs.*,
  122. qst.name AS temp_name,
  123. qst.setting AS temp_setting,
  124. qst.status AS temp_status,
  125. qst.gap AS temp_gap,
  126. qst.sort AS temp_sort,
  127. qst.create_time AS temp_create_time,
  128. qst.create_by AS temp_create_by,
  129. qst.corp_id AS temp_company_id
  130. FROM
  131. qw_sop qs
  132. LEFT JOIN
  133. qw_sop_temp qst ON qs.temp_id = qst.id
  134. WHERE
  135. FIND_IN_SET(#{map.qwUserId}, COALESCE(qs.qw_user_ids, '')) > 0
  136. AND qs.corp_id = #{map.corpId}
  137. AND qst.status = '1'
  138. AND qs.status IN (2, 3, 4)
  139. AND qs.send_type = 4
  140. AND (
  141. <foreach collection='map.tagsIdsSelectList' item='item' index='index' separator=' or '>
  142. find_in_set( #{item}, TRIM(REGEXP_REPLACE(qs.tags, '[\"\\\\[\\\\]]', '')) )
  143. </foreach>
  144. )
  145. </select>
  146. <select id="selectQwSopByQwUserId" resultType="com.fs.qw.vo.QwSopRuleTimeVO">
  147. SELECT
  148. qs.*
  149. FROM
  150. qw_sop qs
  151. LEFT JOIN
  152. qw_sop_temp qst ON qs.temp_id = qst.id
  153. WHERE
  154. FIND_IN_SET(#{map.qwUserId}, COALESCE(qs.qw_user_ids, '')) > 0
  155. AND qs.corp_id = #{map.corpId}
  156. AND qst.status = '1'
  157. AND qs.status IN (2, 3, 4)
  158. AND qs.send_type = #{map.sendType}
  159. </select>
  160. <select id="checkSopRuleTime" resultType="com.fs.qw.vo.QwSopRuleTimeVO">
  161. <![CDATA[
  162. SELECT
  163. qs.*,
  164. qst.name AS temp_name,
  165. qst.setting AS temp_setting,
  166. qst.status AS temp_status,
  167. qst.gap AS temp_gap,
  168. qst.sort AS temp_sort,
  169. qst.create_time AS temp_create_time,
  170. qst.create_by AS temp_create_by,
  171. qst.corp_id AS temp_company_id
  172. FROM
  173. qw_sop qs
  174. LEFT JOIN qw_sop_temp qst ON qs.temp_id = qst.id
  175. WHERE
  176. qs.status = 1
  177. AND qs.start_time <= NOW()
  178. ]]>
  179. </select>
  180. <select id="selectQwSopByClickHouseId" parameterType="String" resultType="com.fs.qw.vo.QwSopRuleTimeVO">
  181. <![CDATA[
  182. SELECT
  183. qs.*,
  184. qst.name AS temp_name,
  185. qst.setting AS temp_setting,
  186. qst.status AS temp_status,
  187. qst.gap AS temp_gap,
  188. qst.sort AS temp_sort,
  189. qst.create_time AS temp_create_time,
  190. qst.create_by AS temp_create_by,
  191. qst.corp_id AS temp_company_id
  192. FROM
  193. qw_sop qs
  194. LEFT JOIN
  195. qw_sop_temp qst
  196. ON
  197. qs.temp_id = qst.id
  198. WHERE
  199. qs.id = #{id}
  200. ]]>
  201. </select>
  202. <select id="selectQwSopList" parameterType="QwSop" resultMap="QwSopResult">
  203. <include refid="selectQwSopVo"/>
  204. <where>
  205. <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
  206. <if test="status != null "> and status = #{status}</if>
  207. <if test="type != null "> and type = #{type}</if>
  208. <if test="id != null "> and id = #{id}</if>
  209. <if test="companyId != null "> and company_id = #{companyId}</if>
  210. <if test="qwUserIds != null and qwUserIds != ''"> and FIND_IN_SET(#{qwUserIds}, qw_user_ids) > 0</if>
  211. <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
  212. <if test="corpId != null and corpId != ''"> and corp_id = #{corpId}</if>
  213. <if test="createTime != null "> and DATE(create_time) = #{createTime}</if>
  214. <if test="sendType != null "> and send_type = #{sendType}</if>
  215. <if test="expiryTime != null "> and expiry_time = #{expiryTime}</if>
  216. <if test="isAutoSop != null "> and is_auto_sop = #{isAutoSop}</if>
  217. <if test="autoSopTime != null "> and auto_sop_time = #{autoSopTime}</if>
  218. <if test="minSend != null "> and min_send = #{minSend}</if>
  219. <if test="maxSend != null "> and max_send = #{maxSend}</if>
  220. <if test="stopTime != null "> and stop_time = #{stopTime}</if>
  221. <!-- 加入固定条件 -->
  222. and status != 6
  223. </where>
  224. order by create_time desc
  225. </select>
  226. <select id="selectChatQwSopList" parameterType="QwSop" resultMap="QwSopResult">
  227. <include refid="selectQwSopVo"/>
  228. where send_type = 4
  229. and status != 6
  230. order by create_time desc
  231. </select>
  232. <select id="selectQwSopByIsRating" parameterType="QwSop" resultMap="QwSopResult">
  233. <include refid="selectQwSopVo"/>
  234. where is_rating = 1
  235. and send_type in(2,3)
  236. order by create_time desc
  237. </select>
  238. <select id="selectQwSopById" parameterType="String" resultMap="QwSopResult">
  239. <include refid="selectQwSopVo"/>
  240. where id = #{id}
  241. </select>
  242. <insert id="insertQwSop" parameterType="com.fs.sop.domain.QwSop" useGeneratedKeys="false" keyProperty="id">
  243. insert into qw_sop
  244. <trim prefix="(" suffix=")" suffixOverrides=",">
  245. <if test="data.name != null">name,</if>
  246. <if test="data.status != null">status,</if>
  247. <if test="data.type != null">type,</if>
  248. <if test="data.qwUserIds != null">qw_user_ids,</if>
  249. <if test="data.createBy != null">create_by,</if>
  250. <if test="data.createTime != null">create_time,</if>
  251. <if test="data.companyId != null">company_id,</if>
  252. <if test="data.sendType != null">send_type,</if>
  253. <if test="data.tags != null">tags,</if>
  254. <if test="data.excludeTags != null">exclude_tags,</if>
  255. <if test="data.startTime != null">start_time,</if>
  256. <if test="data.filterType != null">filter_type,</if>
  257. <if test="data.tempId != null">temp_id,</if>
  258. <if test="data.corpId != null">corp_id,</if>
  259. <if test="data.expiryTime != null">expiry_time,</if>
  260. <if test="data.isAutoSop != null">is_auto_sop,</if>
  261. <if test="data.autoSopTime != null">auto_sop_time,</if>
  262. <if test="data.minConversionDay != null">min_conversion_day,</if>
  263. <if test="data.maxConversionDay != null">max_conversion_day,</if>
  264. <if test="data.minSend != null">min_send,</if>
  265. <if test="data.maxSend != null">max_send,</if>
  266. <if test="data.isRating != null">is_rating,</if>
  267. <if test="data.courseDay != null">course_day,</if>
  268. <if test="data.openCommentStatus != null">open_comment_status,</if>
  269. </trim>
  270. <trim prefix="values (" suffix=")" suffixOverrides=",">
  271. <if test="data.name != null">#{data.name},</if>
  272. <if test="data.status != null">#{data.status},</if>
  273. <if test="data.type != null">#{data.type},</if>
  274. <if test="data.qwUserIds != null">#{data.qwUserIds},</if>
  275. <if test="data.createBy != null">#{data.createBy},</if>
  276. <if test="data.createTime != null">#{data.createTime},</if>
  277. <if test="data.companyId != null">#{data.companyId},</if>
  278. <if test="data.sendType != null">#{data.sendType},</if>
  279. <if test="data.tags != null">#{data.tags},</if>
  280. <if test="data.excludeTags != null">#{data.excludeTags},</if>
  281. <if test="data.startTime != null">#{data.startTime},</if>
  282. <if test="data.filterType != null">#{data.filterType},</if>
  283. <if test="data.tempId != null">#{data.tempId},</if>
  284. <if test="data.corpId != null">#{data.corpId},</if>
  285. <if test="data.expiryTime != null">#{data.expiryTime},</if>
  286. <if test="data.isAutoSop != null">#{data.isAutoSop},</if>
  287. <if test="data.autoSopTime != null">#{data.autoSopTime},</if>
  288. <if test="data.minConversionDay != null">#{data.minConversionDay},</if>
  289. <if test="data.maxConversionDay != null">#{data.maxConversionDay},</if>
  290. <if test="data.minSend != null">#{data.minSend},</if>
  291. <if test="data.maxSend != null">#{data.maxSend},</if>
  292. <if test="data.isRating != null">#{data.isRating},</if>
  293. <if test="data.courseDay != null">#{data.courseDay},</if>
  294. <if test="data.openCommentStatus != null">#{data.openCommentStatus},</if>
  295. </trim>
  296. </insert>
  297. <update id="updateAutoSopTime" useGeneratedKeys="false" keyProperty="id" >
  298. UPDATE qw_sop
  299. SET
  300. is_auto_sop = #{map.isAutoSop}
  301. <if test="map.autoSopTime != null and map.autoSopTime != ''">
  302. ,auto_sop_time = #{map.autoSopTime}
  303. </if>
  304. WHERE id = #{map.id}
  305. </update>
  306. <update id="updateSopStatus" useGeneratedKeys="false" keyProperty="id" >
  307. UPDATE qw_sop
  308. SET status = #{map.status},stop_time = NOW()
  309. WHERE id = #{map.id}
  310. </update>
  311. <select id="selectStatusQwSopById" resultType="QwSop">
  312. select * from qw_sop where id in
  313. <foreach item="id" collection="ids" open="(" separator="," close=")">
  314. #{id}
  315. </foreach>
  316. </select>
  317. <select id="executeSopByIds" resultType="com.fs.qw.vo.QwSopRuleTimeVO">
  318. SELECT qs.*,
  319. qst.name AS temp_name,
  320. qst.setting AS temp_setting,
  321. qst.status AS temp_status,
  322. qst.gap AS temp_gap,
  323. qst.sort AS temp_sort,
  324. qst.create_time AS temp_create_time,
  325. qst.create_by AS temp_create_by,
  326. qst.corp_id AS temp_company_id
  327. FROM qw_sop qs
  328. LEFT JOIN qw_sop_temp qst ON qs.temp_id = qst.id
  329. WHERE qs.id IN
  330. <foreach item="id" collection="ids" open="(" separator="," close=")">
  331. #{id}
  332. </foreach>
  333. </select>
  334. <select id="executeSopWxByIds" resultType="com.fs.qw.vo.WxSopRuleTimeVO">
  335. SELECT qs.*,
  336. qst.name AS temp_name,
  337. qst.setting AS temp_setting,
  338. qst.status AS temp_status,
  339. qst.gap AS temp_gap,
  340. qst.sort AS temp_sort,
  341. qst.create_time AS temp_create_time,
  342. qst.create_by AS temp_create_by,
  343. qst.corp_id AS temp_company_id
  344. FROM qw_sop qs
  345. LEFT JOIN qw_sop_temp qst ON qs.temp_id = qst.id
  346. WHERE qs.id IN
  347. <foreach item="id" collection="ids" open="(" separator="," close=")">
  348. #{id}
  349. </foreach>
  350. </select>
  351. <select id="selectAiChatQwSopList" resultType="com.fs.sop.domain.QwSop">
  352. <include refid="selectQwSopVo"/>
  353. <where>
  354. send_type = 4
  355. <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
  356. <if test="status != null "> and status = #{status}</if>
  357. <if test="type != null "> and type = #{type}</if>
  358. <if test="companyId != null "> and company_id = #{companyId}</if>
  359. <if test="qwUserIds != null and qwUserIds != ''"> and qw_user_ids = #{qwUserIds}</if>
  360. <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
  361. <if test="corpId != null and corpId != ''"> and corp_id = #{corpId}</if>
  362. <if test="createTime != null "> and DATE(create_time) = #{createTime}</if>
  363. <if test="expiryTime != null "> and expiry_time = #{expiryTime}</if>
  364. <if test="isAutoSop != null "> and is_auto_sop = #{isAutoSop}</if>
  365. <if test="autoSopTime != null "> and auto_sop_time = #{autoSopTime}</if>
  366. <if test="minSend != null "> and min_send = #{minSend}</if>
  367. <if test="maxSend != null "> and max_send = #{maxSend}</if>
  368. <if test="stopTime != null "> and stop_time = #{stopTime}</if>
  369. <!-- 加入固定条件 -->
  370. and status != 6
  371. </where>
  372. order by create_time desc
  373. </select>
  374. <select id="selectByTemplateId" resultType="com.fs.sop.domain.QwSop">
  375. select * from qw_sop where temp_id = #{tempId}
  376. </select>
  377. <select id="selectWxSop" resultType="com.fs.sop.domain.QwSop">
  378. select a.* from qw_sop a
  379. where a.send_type != 4 and a.status in (2,3) and a.type = 1
  380. </select>
  381. <update id="updateQwSop" parameterType="QwSop" useGeneratedKeys="false" keyProperty="id" >
  382. UPDATE qw_sop
  383. <trim prefix="SET" suffixOverrides=",">
  384. <if test="data.name != null">name = #{data.name},</if>
  385. <if test="data.status != null">status = #{data.status},</if>
  386. <if test="data.type != null">type = #{data.type},</if>
  387. <if test="data.qwUserIds != null">qw_user_ids = #{data.qwUserIds},</if>
  388. <if test="data.createBy != null">create_by = #{data.createBy},</if>
  389. <if test="data.createTime != null">create_time = #{data.createTime},</if>
  390. <if test="data.companyId != null">company_id = #{data.companyId},</if>
  391. <if test="data.sendType != null">send_type = #{data.sendType},</if>
  392. <if test="data.tags != null">tags = #{data.tags},</if>
  393. <if test="data.excludeTags != null">exclude_tags = #{data.excludeTags},</if>
  394. <if test="data.startTime != null">start_time = #{data.startTime},</if>
  395. <if test="data.filterType != null">filter_type = #{data.filterType},</if>
  396. <if test="data.tempId != null">temp_id = #{data.tempId},</if>
  397. <if test="data.corpId != null">corp_id = #{data.corpId},</if>
  398. <if test="data.expiryTime != null">expiry_time = #{data.expiryTime},</if>
  399. <if test="data.isAutoSop != null">is_auto_sop = #{data.isAutoSop},</if>
  400. <if test="data.autoSopTime != null">auto_sop_time = #{data.autoSopTime},</if>
  401. <if test="data.minConversionDay != null">min_conversion_day = #{data.minConversionDay},</if>
  402. <if test="data.maxConversionDay != null">max_conversion_day = #{data.maxConversionDay},</if>
  403. <if test="data.minSend != null">min_send = #{data.minSend},</if>
  404. <if test="data.maxSend != null">max_send = #{data.maxSend},</if>
  405. <if test="data.voice != null">voice = #{data.voice},</if>
  406. <if test="data.isRating != null">is_rating = #{data.isRating},</if>
  407. <if test="data.courseDay != null">course_day = #{data.courseDay},</if>
  408. <if test="data.openCommentStatus != null">open_comment_status = #{data.openCommentStatus},</if>
  409. </trim>
  410. where id = #{data.id}
  411. </update>
  412. <delete id="deleteQwSopById" parameterType="String">
  413. DELETE FROM qw_sop
  414. where id = #{id}
  415. </delete>
  416. <delete id="deleteQwSopByIds" parameterType="String">
  417. DELETE FROM qw_sop
  418. where id in
  419. <foreach item="id" collection="array" open="(" separator="," close=")">
  420. #{id}
  421. </foreach>
  422. </delete>
  423. <update id="deleteQwSopByIdsUpdate" useGeneratedKeys="false" keyProperty="id">
  424. UPDATE qw_sop
  425. SET status = 6
  426. WHERE id IN
  427. <foreach item="id" collection="ids" open="(" separator="," close=")">
  428. #{id}
  429. </foreach>
  430. </update>
  431. <update id="updateStatusQwSopById" useGeneratedKeys="false" keyProperty="id" >
  432. UPDATE qw_sop
  433. SET status = 4
  434. WHERE id IN
  435. <foreach item="id" collection="ids" open="(" separator="," close=")">
  436. #{id}
  437. </foreach>
  438. </update>
  439. <update id="updateMinSendStatus">
  440. UPDATE qw_sop
  441. SET min_send = 1
  442. WHERE id = #{id}
  443. </update>
  444. <update id="updateMaxSendStatus">
  445. UPDATE qw_sop
  446. SET max_send = 1
  447. WHERE id = #{id}
  448. </update>
  449. <select id="executeSopChatByIds" resultType="com.fs.qw.vo.ChatSopRuleTimeVO">
  450. SELECT qs.*,
  451. qst.name AS temp_name,
  452. qst.setting AS temp_setting,
  453. qst.status AS temp_status,
  454. qst.gap AS temp_gap,
  455. qst.sort AS temp_sort,
  456. qst.create_time AS temp_create_time,
  457. qst.create_by AS temp_create_by,
  458. qst.corp_id AS temp_company_id
  459. FROM qw_sop qs
  460. LEFT JOIN qw_sop_temp qst ON qs.temp_id = qst.id
  461. WHERE qs.id IN
  462. <foreach item="id" collection="ids" open="(" separator="," close=")">
  463. #{id}
  464. </foreach>
  465. </select>
  466. <update id="updateStatusQwSopById2" useGeneratedKeys="false" keyProperty="id" >
  467. UPDATE qw_sop
  468. SET status = 3
  469. WHERE id IN
  470. <foreach item="id" collection="ids" open="(" separator="," close=")">
  471. #{id}
  472. </foreach>
  473. </update>
  474. </mapper>