and a.order_tab_id in
${orderId}
sql语法错误,你可以在控制台或者日志文件,找到打印的sql.
017-05-05 16:48:16 -70737 [http-bio-8080-exec-1] INFO - Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
2017-05-05 16:48:16 -70808 [http-bio-8080-exec-1] INFO - SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
2017-05-05 16:48:16 -70826 [http-bio-8080-exec-1] DEBUG - {conn-10002, pstmt-20024} enter cache
2017-05-05 16:48:16 -70830 [http-bio-8080-exec-1] ERROR - org.springframework.jdbc.BadSqlGrammarException:
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column '0613b2f5fd1542f7a0733371e490cbc8' in 'where clause'
org.springframework.jdbc.BadSqlGrammarException:
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column '0613b2f5fd1542f7a0733371e490cbc8' in 'where clause'
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:71)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:364)
at com.sun.proxy.$Proxy17.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:194)
at cn.com.hexway.dao.DaoSupport.findForList(DaoSupport.java:141)
at cn.com.hexway.service.citydelivery.cdsorder.CdsOrderService.list(CdsOrderService.java:70)
at cn.com.hexway.service.citydelivery.cdsorder.CdsOrderService$$FastClassBySpringCGLIB$$245dd553.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:708)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
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:644)
at cn.com.hexway.service.citydelivery.cdsorder.CdsOrderService$$EnhancerBySpringCGLIB$$98447f66.list()
贴出sql语句以及控制台打印出来的异常
and a.order_tab_id in
${orderId}
你的sql语句发出来看看
separator=“UNION”