WGCAT工单系统发现错误 定时处理工单数据任务错误
一直在用WGCAT工单系统,今天在系统日志里,看到了这个错误提示,不知道是什么原因
2025-04-26 07:05:00.000 [taskScheduler-10] INFO com.wgcloud.task.ScheduledTask - 定时处理工单数据任务开始----------2025-04-26 07:05:00
2025-04-26 07:05:00.016 [taskScheduler-10] ERROR com.wgcloud.task.ScheduledTask - 定时处理工单数据任务错误
org.springframework.jdbc.BadSqlGrammarException:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE_TIME <='2025-02-26 07:05:00' ORDER BY ID ASC' at line 21
### The error may exist in class path resource [mybatis/mapper/WorkInfoMapper.xml]
### The error may involve com.wgcloud.mapper.WorkInfoMapper.selectAllByParams-Inline
### The error occurred while setting parameters
### SQL: SELECT ID,WORK_TITLE,WORK_CONTENT,STATE,WORK_TYPE,ADD_ACCOUNT,ACCEPT_ACCOUNT,UPDATE_TIME,CREATE_TIME,ADD_ACCOUNT_NAME,ACCEPT_ACCOUNT_NAME,GROUP_ID FROM WORK_INFO t WHERE STATE IN ( ? , ? ) CREATE_TIME <=? ORDER BY ID ASC
### Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE_TIME <='2025-02-26 07:05:00' ORDER BY ID ASC' at line 21
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE_TIME <='2025-02-26 07:05:00' ORDER BY ID ASC' at line 21at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:236)at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92)at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439)at com.sun.proxy.$Proxy65.selectList(Unknown Source)
......
处理方法如下: