mybatis 遍历list拼接 or查询

<if test="myList != null and myList.size() >0">
    <foreach collection="myList" index="index" item="item" open="and (" separator=" or " close=")">
        name like concat("%",#{item,jdbcType=VARCHAR},";%")
</foreach>
</if>
posted @ 2021-05-27 10:57  已老  阅读(1899)  评论(0)    收藏  举报