mybatis 3.3.0中對(duì)于時(shí)間參數(shù)進(jìn)行比較時(shí)的一個(gè)bug. 如果拿傳入的時(shí)間類型參數(shù)與空字符串''進(jìn)行對(duì)比判斷則會(huì)引發(fā)異常. 所以在上面的代碼中去該該判斷, 只保留非空判斷就正常了
[html] view plain copy
<if test="createTime != null and createTime !='' " >
date(create_time) = date(#{createTime,jdbcType=TIMESTAMP})
</if>
改為
[html] view plain copy
<if test="createTime != null">
date(create_time) = date(#{createTime,jdbcType=TIMESTAMP})
</if>