Mybatis的if test字符串比较问题

来源:互联网 发布:什么鼠标垫好用 知乎 编辑:程序博客网 时间:2024/05/21 12:40
<if test="isExpired=='Y'">
and msg.expire_time &lt; now()

</if>

会报NumberFormatException,这样就可以了。

<if test="isExpired=='Y'.toString()">
and msg.expire_time &lt; now()
</if>

0 0
原创粉丝点击