QwSopMapper.xml 21 KB

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