<if test="staus!=null and staus=''"> </if> 因为在做项目中遇到了这个问题就记录一下。 当传过来的参数为0时,mybatis会将它认为是空,所以进不来,不过如果没有这个判断staus=''就不用管了。