错误信息
### Error querying database. Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String
### Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String] with root cause
出错代码
<if test="fromDate != null and fromDate != '' and toDate != null and toDate != ''">
and delivery_time between #{fromDate} and #{toDate}
</if>
动态sql中日期不能和字符串比较
改成如下代码
<if test="fromDate != null and toDate != null">
and delivery_time between #{fromDate} and #{toDate}
</if>