<if test="serverIds!=null">
and serverId in
<foreach item="item" index="index" collection="serverIds" open="(" separator="," close=")">
#{item}
</foreach>
</if>
这里面serverIds是一个集合 传参是时候 if中test不能跟“” 或者其他字符串 比较
mybatis传集合参数 注意事项
最新推荐文章于 2024-07-01 14:32:58 发布