法1:
正确:
<if test='activityBean.searchForce=="N" '>错误:
<if test="activityBean.searchForce=='N' ">
因为java是强类型语言,单引号表示char类型,只能赋给一个字符给char类型,
而双引号则表示String类型
法2:
<if test="isExpired=='Y'">
and msg.expire_time < now()
</if>
会报NumberFormatException,这样就可以了。
<if test="isExpired=='Y'.toString()">and msg.expire_time < now()
</if>
法3:
<if test='verityFailureMark eq "1"'>
theaterLocation='1'
</if>
<if test='verityFailureMark eq "2"'>
ONELINELOCATION='1'
</if>