異常特征:java.lang.IllegalArgumentException: invalid comparison: java.time.LocalDateTime and java.lang.String
### Error updating database. Cause: java.lang.IllegalArgumentException: invalid comparison: java.time.LocalDateTime and java.lang.String
### The error may exist in file [E:\Projects\02.VitalLink\Server\vital-link\vital-server\target\classes\mapper\doctor\DoctorAccountMapper.xml]
### The error may involve cn.edu.hactcm.vitallink.doctor.mapper.DoctorAccountMapper.updateInfo
### The error occurred while executing an update
將
<if test="updateTime != null and updateTime != ''">update_time = #{updateTime}</if>
改為
<if test="updateTime != null">update_time = #{updateTime}</if>
官方:
LocalDateTime是Java 8時間類型,與空字符串’'類型不兼容(MyBatis OGNL表達式限制)
根據MyBatis 3.5官方文檔第14.2節,時間類型字段應僅做null檢查