mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-03-16 19:02:00 +08:00
update 修改框架中批量接口,改为原生mybatis执行foreach,改善性能
This commit is contained in:
@@ -57,4 +57,17 @@
|
||||
order by d.parent_id, d.order_num
|
||||
</select>
|
||||
|
||||
<update id="updateDeptChildren" parameterType="java.util.List">
|
||||
update sys_dept set ancestors =
|
||||
<foreach collection="depts" item="item" index="index"
|
||||
separator=" " open="case dept_id" close="end">
|
||||
when #{item.deptId} then #{item.ancestors}
|
||||
</foreach>
|
||||
where dept_id in
|
||||
<foreach collection="depts" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item.deptId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user