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.  
posted @ 2022-05-15 13:28  枫树湾河桥  阅读(805)  评论(0编辑  收藏  举报
Live2D