MyBatis把传过来的Integer类型的0当作空字符串

传递Integer类型的值,如果传递的是0,到mybatis的mapper的xml文件中是把值当作空字符串,mybatis源码对其进行了强制定义。

<if test="status != null and status !=  '' or status == 0">

使用时增加多一个or status == 0判断