invalid comparison: java.util.Arrays$ArrayList and java.lang.String
作者:互联网
mybatis报错:invalid comparison: java.util.Arrays$ArrayList and java.lang.String
传入参数为数组判断时当字符串处理了
<if test="operationNo!=''"> and o.operation_no in <foreach collection="operationNo" item="operationNo" separator="," open="(" close=")"> #{operationNo,jdbcType=VARCHAR} </foreach> </if>
正确写法
<if test="operationNo!=null"> and o.operation_no in <foreach collection="operationNo" item="operationNo" separator="," open="(" close=")"> #{operationNo,jdbcType=VARCHAR} </foreach> </if>
标签:lang,comparison,java,String,operationNo,no,invalid,operation 来源: https://www.cnblogs.com/xidianlxf/p/11156103.html