项目中使用mybatis-plus
当我们在 xml 文件中校验集合的时候,如果集合为0塞入参数当中使用下面方法校验时,会出现校验失败问题,如下方法不会校验集合等于0的情况
<if test="params != null and params.carNumberList != null and params.carNumberList != ''">
and vmc.licenseNumber not in
<foreach item="item" index="index" collection="params.carNumberList" open="(" separator="," close=")">
#{item}
</foreach>
</if>