mybatis传入的值为0时的判断

在mybatis查询时。遇到这种如果传进来的的status值为0 ,直接跳出if不执行

问题在于status参数类型 ""!= status 只能作用于string,int 、double、float等类型的参数默认值为0 ,将直接跳出if,删掉后面的空字符串判断即可改为

猜你喜欢

转载自blog.csdn.net/bbj12345678/article/details/114161569