<if test="userName != null and userName != 'S'">
</if>
上面这个判断会报错 maybatis 单引号引用默认转成字符 需要在字符后面加上.toString ,
<if test="userName != null and userName != 'S'.toString()">
</if>
否则会报如下错误
<if test="userName != null and userName != 'S'">
</if>
上面这个判断会报错 maybatis 单引号引用默认转成字符 需要在字符后面加上.toString ,
<if test="userName != null and userName != 'S'.toString()">
</if>
否则会报如下错误