【坑】mybatis将整数0识别为null

<if test="deviceNum != null and deviceNum !=''"> AND dev_num = #{deviceNum} </if> 当参数值为0时会过滤掉,此时应该为web <if test="deviceNum != null "> AND dev_num = #{deviceNum} </if> 缘由是, 通常判断的是String类型 mybatis源
相关文章
相关标签/搜索