批量模糊查询 语法 。参数为list

<if test="skuList != null and skuList.length > 1">
and
<foreach collection="skuList" item="sku" index="index" open="(" close=")" separator="or">
t.sku LIKE concat('%',#{sku},'%')
</foreach>
</if>


关键地方标注了,没什么特别的。先支持批量,然后循环里边模糊,注意分隔符用or
posted @ 2021-12-30 11:34  了悟  阅读(166)  评论(0编辑  收藏  举报