1. 根据后台list 在SQL中使用到In的时候
<if test="sbidList != null and sbidList.size() > 0">
AND INDEXCODE IN
<foreach collection="sbidList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
2. like的使用
<if test="jdcsyrXm != '' and jdcsyrXm != null ">
<bind name="jdcsyrXm" value="'%' + jdcsyrXm + '%'" />
jdcsyr_xm LIKE #{jdcsyrXm} AND
</if>