if应用:
<if test="keyWord != null and keyWord != ''">
</if>
keyWord是传进来的参数,判断是否为空和值是否等于空值
IN 集合操作:
<if test="idList != null and idList.size() > 0">
<foreach item="item" index="index" collection="idList"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
idList:传进来的集合参数
index:当前值的index值
item:当前数据