Mybatis分装对象是,将数据“HHH:mm:ss”这种格式的数据按照时间类型分装然后抛出异常,
解决方法:使用字符串连接函数 CONCAT(SEC_TO_TIME(floor(d.stay_time/start_num)))
部分错误信息如下:
org.springframework.dao.TransientDataAccessResourceException:
### Error querying database. Cause: java.sql.SQLException: Bad format for Time '308:42:13' in column 6### The error may exist in file [C:\caoj\workspace-dev\zhkj_oms\src\main\webapp\WEB-INF\classes\mappings\modules\user\TUserDao.xml]
### The error may involve com.zhkj.modules.user.dao.TUserDao.findRegistrationStatisticsList
### The error occurred while handling results
### SQL: select SEC_TO_TIME(floor(d.stay_time/start_num)) once_long_time from user d;
### Cause: java.sql.SQLException: Bad format for Time '308:42:13' in column 6
; SQL []; Bad format for Time '308:42:13' in column 6; nested exception is java.sql.SQLException: Bad format for Time '308:42:13' in column 6