记录mybatis 的坑
<choose>
<when test="isoverfulfil = 'c'">
and pro.Loan_Money*concat("1.",pro.overpercent) >= pro.get_Loan_Money + #{sumMoney,jdbcType=NUMERIC};
</when>
<otherwise>
and pro.loan_Money >= pro.get_Loan_Money + #{sumMoney,jdbcType=NUMERIC};
</otherwise>
</choose>
<when test="isoverfulfil = 'c'"> 永远判断为真 ,应该<when test="isoverfulfil == 'c'"> 才会进行逻辑判断。
初学的菜菜们记住了。
=========================================================
<if test="isExpired=='Y'">
and msg.expire_time < now()
</if>
会报NumberFormatException,这样就可以了。
<if test="isExpired=='Y'.toString()">
and msg.expire_time < now()
</if>
附上:XML转义字符
|
< |
< |
小于号 |
|
> |
> |
大于号 |
|
& |
& |
和 |
|
' |
’ |
单引号 |
|
" |
" |
双引号 |

浙公网安备 33010602011771号