mybatis if标签判断boolean

我试了以下两种不起作用,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>

猜你喜欢

转载自blog.csdn.net/zhangxue_wei/article/details/103857833
今日推荐