mybatis if标签判断boolean等于true或者flase


原文链接: https://blog.csdn.net/az44yao/article/details/123188910

我试了以下两种不起作用,true和false效果一样的
 

  1.   <if test="isQuit != null and isQuit == true">
  2.   AND stage = 7
  3.   if>
  4.   和
  5.   <if test="isQuit">
  6.   AND stage = 7
  7.   if>

最后试了这种成功了
 

    1.   <if test="isQuit != null and 'true'.toString() == isQuit.toString()">
    2.   AND stage = 7
    3.