Mybatis if 标签判断变量相等

时间:2019-11-21 11:57:10   收藏:0   阅读:375
两种方式:
<if test = ‘sex== "Y"‘>
<if test="sex==‘Y‘.toString()">

 

不能使用:

<if test="sex==‘Y‘">
  and 1=1
</if>

会报错:例如for  input  string 

原文:https://www.cnblogs.com/MrXiaoMa/p/11903964.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!