<if test="list != null and list.size()>0" >
and s.orders in
<foreach collection="list" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</if>
对特殊字符进行处理
<if test="list != null and list.size() > 0" >
and s.orders in
<foreach collection="list" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</if>