在xml中如果将时间类型和空字符串""比较,会引发此错误,只保留null判断即可
<if test="null != startDate and startDate != '' ">
start_date=#{startDate,jdbcType=DATE},
</if>
<if test="null != startDate">
start_date=#{startDate,jdbcType=DATE},
</if>
invalid comparison: java.lang.String and java.util.Date
阅读 128
2022-01-06
在xml中如果将时间类型和空字符串""比较,会引发此错误,只保留null判断即可
<if test="null != startDate and startDate != '' ">
start_date=#{startDate,jdbcType=DATE},
</if>
<if test="null != startDate">
start_date=#{startDate,jdbcType=DATE},
</if>
相关推荐
精彩评论(0)