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 @   枫树湾河桥  阅读(848)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
Live2D
欢迎阅读『mybatis if标签判断boolean等于true或者flase』
哥伦布
14:09发布
哥伦布
14:09发布
7°
南风
3级
空气质量
相对湿度
40%
今天
中雨
3°/15°
周三
中雨
3°/14°
周四
小雪
-1°/6°
点击右上角即可分享
微信分享提示