MyBaitis批量更新batchUpdate
update table set a=1
< foreach collection=“ids” index=“index” item=“item” open=" where id in (" separator="," close=")">
#{item}
< /foreach>
//items“循环ids的每条结果集 collections"ids"表示ids为map传过来的参数key
index指定一个名字,表示在迭代过程中每次迭代到的位置
open表示语句以什么开始
close表示语句以什么开结束
separator表示每次迭代间以什么符号为分隔符
参考文章https://www.open-open.com/lib/view/open1412928316327.html