1. 如果传入的参数类型是一个List的时候,collection属性值为list
2. 如果传入的参数类型是一个array数组的时候,collection的属性值为array
<delete id="deleteMul" parameterType="java.util.List">
delete from time_rule where id in (
<foreach collection="array" item="item" index="index"
open="" close="" separator=","> <!-- property="id" -->
#{item}
</foreach>
);
</delete>
最后
以上就是清新刺猬最近收集整理的关于mybatis处理集合和数组的全部内容,更多相关mybatis处理集合和数组内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复