Loading

mybatis foreach中or的拼接操作

 

mybatis  foreach中or的拼接操作:

<if test="labels != null">
    <foreach collection="labels" item="label" open="AND (" close=")" separator="or" >
          concat(',',a.labelId,',') like '%,${label},%'
    </foreach>
</if>

 

posted @ 2021-09-26 19:42  青岑  阅读(1656)  评论(0编辑  收藏  举报