报错原因:
mapper.xml中,将list类型的参数当成string类型的参数进行判断
<if test="factorUids!=null and factorUids!=''">
PollutantCode in
<foreach collection="factorUids" index="index" open="(" close=")" separator="," item="item">
#{item}
</foreach>
</if>
进行if判断时,factorUids并不是string类型,所以不能进行判空操作,将判空操作去掉,或者改成size即可
正确用法:
<if test="factorUids!=null and factorUids.size > 0">
PollutantCode in
<foreach collection="factorUids" index="index" open="(" close=")" separator="," item="item">
#{item}
</foreach>
</if>