错误
<if test="salestype!=null and salestype!=''">
and jg.XSFSBM IN<foreach collection="salestype" index="index" item="item" open="(" separator="," close=")">
#{salestype}
</foreach>
</if>
修改
<if test="salestype!=null">
and jg.XSFSBM IN<foreach collection="salestype" index="index" item="item" open="(" separator="," close=")">
#{item ,jdbcType=VARCHAR}
</foreach>
</if>
循环的数据,最好加上参数类型