mybatis if标签判断boolean

只愿长相守 提交于 2020-02-05 09:36:50

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

<if test="isQuit != null and isQuit  == true">
  AND stage = 7
</if><if test="isQuit">
  AND stage = 7
</if>

最后试了这种成功了

<if test="isQuit != null and 'true'.toString() == isQuit.toString()">
  AND stage = 7
</if>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!