1、直接使用jdk8的 java.time.LocalDateTime 作为参数,传入作为日时间对象处理。
2019-05-19 11:20:39 [restartedMain] DEBUG [JsqlParserCountOptimize.java 59]- JsqlParserCountOptimize sql=select * from fm_forecast where TM BETWEEN 2019-05-19T11:20:29.233 AND 2019-05-12T11:20:29.233
2019-05-19 11:20:40 [restartedMain] DEBUG [BaseJdbcLogger.java 159]- ==> Preparing: SELECT COUNT(1) FROM ( select * from fm_forecast where TM BETWEEN 2019-05-19T11:20:29.233 AND 2019-05-12T11:20:29.233 ) TOTAL
2019-05-19 11:20:40 [restartedMain] DEBUG [BaseJdbcLogger.java 159]- ==> Parameters:
2019-05-19 11:20:41 [restartedMain] ERROR [PaginationInterceptor.java 176]- Error: Method queryTotal execution error !
com.microsoft.sqlserver.jdbc.SQLServerException: 'T11:' 附近有语法错误。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:254) ~[mssql-jdbc-7.0.0.jre8.jar:?]