<if test="isExpired=='Y'">
and msg.expire_time < now()
and msg.expire_time < now()
</if>
会报NumberFormatException,这样就可以了。
<if test="isExpired=='Y'.toString()">
and msg.expire_time < now()
</if>