mybatis 数据条件操作

1.接口传值是list类型,代码如下

<foreach item="id" collection="array" open="(" separator="," close=")">
      #{id}
</foreach>

2.接口传值是hashmap类型并且包含类型,代码如下

<foreach item="id" index="index" collection="ids" open="(" separator="," close=")">
      #{id}
</foreach>
posted @ 2024-11-11 10:08  小海葵  阅读(0)  评论(0编辑  收藏  举报