Mybatis条件判断某属性是否等于指定字符串

7 阅读1分钟

方法一

<if test="statusFlag == '0'.toString()">
    ...
</if>

方法二

<if test='statusFlag == "0" '>
    ...
</if>

方法三

<if test='statusFlag.equals("0")'>
    ...
</if>