mapper传递的参数为如下图中list集合时
在mapper.xml中用if test 判断此集合是否为空的写法如下:
<if test="costsIds != null and costsIds.size()!=0 ">
and standard_costs_id in
<foreach item="item" collection="costsIds" separator="," open="(" close=")">
#{item}
</foreach>
</if>