列表写法
<if test="stausValueList !=null and stausValueList.size > 0">
and d.value in
<foreach item="item" collection="stausValueList" separator="," open="(" close=")" index="">
#{item}
</foreach>
</if>
字符串写法
<if test='ids !=null and ids != ""'>
AND ID IN
<foreach item="pid" index="index" collection="ids.split(',')" open="(" close=")" separator=",">
#{pid}
</foreach>
</if>