Mybatis 接收数值类型,传入0=空字符串
例如:
<if test="state!=null and state != ''" >
AND o.state = #{state}
</if>
state传入0,参数不生效,因为mybatis里认为0就是空字符串,
去掉条件 param.state != '' 即可!
参考文章https://blog.csdn.net/feikillyou/article/details/123382920;
标签:mapper,传入,123382920,问题,state,文件,字符串 From: https://www.cnblogs.com/mafeizhouzi/p/17071854.html