关于动态生成sql语句插入datetime时的注意问题



		insert into wyy_dispatch_order
		
			dispatch_order_id,
			
				`work_order_id`,
			
			
				`receive_userid`,
			
			
				`dispatch_userid`,
			
			
				`dispatch_time`,
			
			
				`is_delete`,
			
			
				`dispatch_type`,
			
			
				`first_waring_time`,
			
			
				`second_waring_time`,
			
		
		
			#{dispatch_order_id,jdbcType=VARCHAR},
			
				#{work_order_id},
			
			
				#{receive_userid},
			
			
				#{dispatch_userid},
			
			
				#{dispatch_time},
			
			
				#{is_delete},
			
			
				#{dispatch_type}
			
			
				#{first_waring_time}
			
			
				#{second_waring_time}
			
		
    
 
2018-06-22 11:01:12.971 DEBUG 16776 --- [  XNIO-5 task-6] c.d.m.app.dao.AppUserDao.queryObject     : ==>  Preparing: select au.*, s.`name` AS organizationName from app_user au LEFT JOIN organization s ON au.organizationId=s.id where au.id = ? 
2018-06-22 11:01:12.971 DEBUG 16776 --- [  XNIO-5 task-6] c.d.m.app.dao.AppUserDao.queryObject     : ==> Parameters: 0c950c92659b4459aaab0142bf7cdcd9(String)
2018-06-22 11:01:12.997 DEBUG 16776 --- [  XNIO-5 task-6] c.d.m.app.dao.AppUserDao.queryObject     : <==      Total: 1
2018-06-22 11:01:12.998  INFO 16776 --- [  XNIO-5 task-6] com.dhys.common.aspect.ApiLogAspect      : ApiLogAspect.timeAround()
2018-06-22 11:01:13.023 DEBUG 16776 --- [  XNIO-5 task-6] c.d.wyy.dao.ServicerDao.queryAppUserId   : ==>  Preparing: SELECT app_userid FROM wyy_role WHERE role_id = ? 
2018-06-22 11:01:13.023 DEBUG 16776 --- [  XNIO-5 task-6] c.d.wyy.dao.ServicerDao.queryAppUserId   : ==> Parameters: c2df4f1694ce48d1be76abf4fc200f5a(String)
2018-06-22 11:01:13.049 DEBUG 16776 --- [  XNIO-5 task-6] c.d.wyy.dao.ServicerDao.queryAppUserId   : <==      Total: 1
2018-06-22 11:01:13.049 DEBUG 16776 --- [  XNIO-5 task-6] c.d.w.d.W.queyWaringRuleByRuleType       : ==>  Preparing: SELECT * FROM wyy_waring_rule WHERE rule_type = ? AND is_delete =? 
2018-06-22 11:01:13.049 DEBUG 16776 --- [  XNIO-5 task-6] c.d.w.d.W.queyWaringRuleByRuleType       : ==> Parameters: 26(Integer), 0(Integer)
2018-06-22 11:01:13.075 DEBUG 16776 --- [  XNIO-5 task-6] c.d.w.d.W.queyWaringRuleByRuleType       : <==      Total: 1
2018-06-22 11:01:13.075 DEBUG 16776 --- [  XNIO-5 task-6] c.d.w.d.ServicerDao.insertDispatchOrder  : ==>  Preparing: insert into wyy_dispatch_order ( dispatch_order_id, `work_order_id`, `receive_userid`, `dispatch_userid`, `dispatch_time`, `is_delete`, `dispatch_type`, `first_waring_time`, `second_waring_time` ) values ( ?, ?, ?, ?, ?, ?, ? ? ? ) 
2018-06-22 11:01:13.076 DEBUG 16776 --- [  XNIO-5 task-6] c.d.w.d.ServicerDao.insertDispatchOrder  : ==> Parameters: e8ce331edc4b4779947c6b7cf914fa8c(String), 80bd2345bffb40bb8fedc5b338035e01(String), 00c3f8918078482c80f8b33c7528368c(String), 0c950c92659b4459aaab0142bf7cdcd9(String), 2018-06-22 11:01:13.049(Timestamp), 0(Integer), 2(Integer), 2018-06-22 11:06:13.049(Timestamp), 2018-06-22 11:11:13.049(Timestamp)
2018-06-22 11:01:13.204 ERROR 16776 --- [  XNIO-5 task-6] com.dhys.common.aspect.ApiLogAspect      : 统计某方法执行耗时环绕通知出错

org.springframework.jdbc.BadSqlGrammarException: 
### Error updating database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 ''2018-06-22 11:06:13.049'
			
			
				'2018-06-22 11:11:13.049' )' at line 46
### The error may involve com.dhys.wyy.dao.ServicerDao.insertDispatchOrder-Inline
### The error occurred while setting parameters
### SQL: insert into wyy_dispatch_order    ( dispatch_order_id,         `work_order_id`,             `receive_userid`,             `dispatch_userid`,             `dispatch_time`,             `is_delete`,             `dispatch_type`,             `first_waring_time`,             `second_waring_time` )     values ( ?,         ?,             ?,             ?,             ?,             ?,             ?             ?             ? )
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 ''2018-06-22 11:06:13.049'
			
			
				'2018-06-22 11:11:13.049' )' at line 46
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 ''2018-06-22 11:06:13.049'
			
			
				'2018-06-22 11:11:13.049' )' at line 46
	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
	at com.sun.proxy.$Proxy108.insert(Unknown Source)
	at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:278)
	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:57)
	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
	at com.sun.proxy.$Proxy313.insertDispatchOrder(Unknown Source)
	at com.dhys.wyy.service.impl.ServicerServiceImpl.dispatchmanager(ServicerServiceImpl.java:100)
	at com.dhys.wyy.service.impl.ServicerServiceImpl$$FastClassBySpringCGLIB$$b717a85d.invoke()
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
	at com.dhys.wyy.service.impl.ServicerServiceImpl$$EnhancerBySpringCGLIB$$4be43b3b.dispatchmanager()
	at com.dhys.wyy.controller.ServicerController.dispatchmanager(ServicerController.java:156)
	at com.dhys.wyy.controller.ServicerController$$FastClassBySpringCGLIB$$6b3d4b71.invoke()
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:97)
	at com.dhys.common.aspect.ApiLogAspect.timeAround(ApiLogAspect.java:57)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
	at com.dhys.wyy.controller.ServicerController$$EnhancerBySpringCGLIB$$5714579d.dispatchmanager()
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
	at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at com.dhys.common.utils.xss.XssFilter.doFilter(XssFilter.java:24)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:110)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:108)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167)
	at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:64)
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.SessionRestoringHandler.handleRequest(SessionRestoringHandler.java:119)
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:336)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 ''2018-06-22 11:06:13.049'
			
			
				'2018-06-22 11:11:13.049' )' at line 46
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.Util.getInstance(Util.java:408)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2490)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
	at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1197)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
	at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
	at com.sun.proxy.$Proxy231.execute(Unknown Source)
	at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:46)
	at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
	at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50)
	at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
	at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
	at sun.reflect.GeneratedMethodAccessor134.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)
	at com.sun.proxy.$Proxy229.update(Unknown Source)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:185)
	at sun.reflect.GeneratedMethodAccessor196.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
	... 122 common frames omitted

2018-06-22 11:01:13.205 DEBUG 16776 --- [  XNIO-5 task-6] c.d.m.app.dao.AppUserDao.queryObject     : ==>  Preparing: select au.*, s.`name` AS organizationName from app_user au LEFT JOIN organization s ON au.organizationId=s.id where au.id = ? 
2018-06-22 11:01:13.206 DEBUG 16776 --- [  XNIO-5 task-6] c.d.m.app.dao.AppUserDao.queryObject     : ==> Parameters: 0c950c92659b4459aaab0142bf7cdcd9(String)
2018-06-22 11:01:13.232 DEBUG 16776 --- [  XNIO-5 task-6] c.d.m.app.dao.AppUserDao.queryObject     : <==      Total: 1
2018-06-22 11:01:13.235  INFO 16776 --- [  XNIO-5 task-6] com.dhys.common.aspect.ApiLogAspect      : 方法[dispatchmanager]执行时间为:207毫秒
2018-06-22 11:01:13.246  INFO 16776 --- [ool-14-thread-2] c.dhys.core.log.factory.LogTaskFactory   : LogTaskFactory saveLog params:{"cardId":"1235123","createTime":"2018-03-23 17:13:30","email":"[email protected]","id":"0c950c92659b4459aaab0142bf7cdcd9","isJob":0,"isPerson":"1","lastlogin":"2018-06-14 13:58:25","online":"18390904435","organizationId":24,"organizationName":"第一置业","password":"ZFcZw4aO81U9arUtt0b5jA==","phone":"17608457728","userName":"方娜","valid":0}
2018-06-22 11:01:13.273 DEBUG 16776 --- [ool-14-thread-2] com.dhys.module.app.dao.ApiLogDao.save   : ==>  Preparing: insert into api_log ( id, `username`, `operation`, `method`, `params`, `ip`, `time`, `create_date` ) values ( ?, ?, ?, ?, ?, ?, ?, ? ) 
2018-06-22 11:01:13.274 DEBUG 16776 --- [ool-14-thread-2] com.dhys.module.app.dao.ApiLogDao.save   : ==> Parameters: 4d29543969f540f9b36df703cd957da5(String), 17608457728(String), 指派工程主管(String), com.dhys.wyy.controller.ServicerController.dispatchmanager()(String), {"cardId":"1235123","createTime":"2018-03-23 17:13:30","email":"[email protected]","id":"0c950c92659b4459aaab0142bf7cdcd9","isJob":0,"isPerson":"1","lastlogin":"2018-06-14 13:58:25","online":"18390904435","organizationId":24,"organizationName":"第一置业","password":"ZFcZw4aO81U9arUtt0b5jA==","phone":"17608457728","userName":"方娜","valid":0}(String), 192.168.0.145(String), 207(Long), 2018-06-22 11:01:13.246(Timestamp)
2018-06-22 11:01:13.325 DEBUG 16776 --- [ool-14-thread-2] com.dhys.module.app.dao.ApiLogDao.save   : <==    Updates: 1解决

解决方案:

INSERT INTO wyy_dispatch_order (
		dispatch_order_id,
		work_order_id,
		dispatch_userid,
		dispatch_time,
		is_receive,
		dispatch_demo,
		is_delete,
		dispatch_type,
		receive_userid,
		first_waring_time,
		second_waring_time
		)
		VALUES
		(
		#{dispatch_order_id},
		#{work_order_id},
		#{dispatch_userid},
		#{dispatch_time},
		#{is_receive},
		#{dispatch_demo},
		#{is_delete},
		#{dispatch_type},
		#{receive_userid},
		#{first_waring_time},
		#{second_waring_time}
		)

原因:采用动态sql语句方式,不能注入时间。静态的则可以注入时间。 

 

你可能感兴趣的:(MyBatis)