Mybatis在进行<if test="status != null and status != ''">判空操作时,如果status为0的时候,该判断条件的值为false,也就是说Mybatis此时把0作为 ""来进行判断的!
<if test="status != null and status != ''">
status 若为对象数据类型(例integer)就去掉为""判断 若为其他可以自定义在server参数处理成自定义的值。
posted on 2018-06-01 14:04 yhtomail 阅读(433) 评论(0) 编辑 收藏 举报