mybatis.xml中有if判断条件判断参数不为空时,赋值为0的Integer参数被MyBatis判断为空,因此不执行<if test="param != null and param != ''"></if>的SQL. 所以在做项目时一定要注意,用到MyBatis时,避免用0来做值. 解决方法: <if test="status !=null and (status!='' or status == 0)"> AND t1.`…
<if test="valiStatus==null || valiStatus=='' || valiStatus==4 "> b.work_permit_card_cert is not null and b.work_permit_card_cert!=1 and b.delete_flag =0 </if> <if test="valiStatus==0"> u.user_type = 0 and b.work_permi…