integer a = 0; <if test="a != null and a != '' and a== 0"> </if>
你会发现这个条件永远不会成立,因为mybatis的if将0认为是'',所以这样判断是无法进入条件的,将数字换为1,2之类的就可以了;
integer a = 0; <if test="a != null and a != '' and a== 0"> </if>
你会发现这个条件永远不会成立,因为mybatis的if将0认为是'',所以这样判断是无法进入条件的,将数字换为1,2之类的就可以了;