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>