mybatis中in方法的使用

传递参数必须是数组或者list,传递的如果是字符串会报错(使用foreach进行遍历)

(<foreach item="temp" index="index" collection="defaultGroup" separator=",">
#{temp}
</foreach>)

其中“defaultGroup”为传递的变量

posted @ 2020-03-17 18:00  静默之尘  阅读(391)  评论(0编辑  收藏  举报