Mybatis if 标签判断变量相等

两种方式:
<if test = 'sex== "Y"'>
<if test="sex=='Y'.toString()">

 

不能使用:

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

会报错:例如for  input  string 

posted @ 2019-11-21 10:23  靖丶  阅读(1053)  评论(0)    收藏  举报