数组判断:
参数为数组[] 时,先判断是否为空,再进行数组长度的判断 不为空则进行遍历
<if test="array != null and array.length > 0">
and status in
<foreach collection="array " item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
集合list 判断:
在MyBatis判断空时,先判断是否为null,不为null则判断集合长度object.size()是否大于0即可
<if test="list != null and list.size()> 0">
<sql>
</if>