NutzCN Logo
问答 queryByJoin关联查询的问题
发布于 232天前 作者 KartKing 506 次浏览 复制 上一个帖子 下一个帖子
标签:

当一个实体类A有多个@One指向同一个实体类B,用queryByJoin就会报错

Not unique table/alias: 'B'

现在的需求是导出Excel,某些情况下会导出不少数据,如果用query+fetchLinks也能实现,但是效率很低。
我现在是用自定义SQL,通过list(SQL)方法取出List对象,然后遍历通过Lang.collection2list方式配置实体类A的List,
然后用J4E插件导出,可以实现,效率也还可以,还有其他简便的方法吗?

19 回复

日志贴来看看

说错,是遍历list对象通过Lang.map2Object方法配置实体类A的List。

java.sql.SQLSyntaxErrorException: Not unique table/alias: 'sys_user'
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:536)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:513)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:115)
	at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:1983)
	at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:1936)
	at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1422)
	at com.alibaba.druid.filter.FilterChainImpl.statement_executeQuery(FilterChainImpl.java:2473)
	at com.alibaba.druid.filter.FilterAdapter.statement_executeQuery(FilterAdapter.java:2503)
	at com.alibaba.druid.filter.FilterEventAdapter.statement_executeQuery(FilterEventAdapter.java:302)
	at com.alibaba.druid.filter.FilterChainImpl.statement_executeQuery(FilterChainImpl.java:2470)
	at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.executeQuery(StatementProxyImpl.java:221)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:217)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(NutDaoExecutor.java:246)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:53)
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor._exec(CachedNutDaoExecutor.java:319)
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:188)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66)
	at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)
	at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:159)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:126)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:93)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:82)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:240)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:252)
	at org.nutz.dao.impl.NutDao.queryByJoin(NutDao.java:1214)
	at org.nutz.dao.impl.NutDao.queryByJoin(NutDao.java:1204)
	at com.ttjrcs.common.base.Service.queryByJoin(Service.java:698)
	at com.ttjrcs.modules.controllers.business.BusRecordController.export(BusRecordController.java:173)
	at com.ttjrcs.modules.controllers.business.BusRecordController$FM$export$53fc47ffb6a404eaa8129ae58ad9e3b8.invoke(BusRecordController.java)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:38)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.ttjrcs.common.processor.XssSqlFilterProcessor.process(XssSqlFilterProcessor.java:37)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.ttjrcs.common.processor.TtjrcsShiroProcessor.process(TtjrcsShiroProcessor.java:55)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.ttjrcs.common.processor.GlobalsSettingProcessor.process(GlobalsSettingProcessor.java:39)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.ttjrcs.common.processor.LogTimeProcessor.process(LogTimeProcessor.java:24)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.ttjrcs.common.filter.RouteFilter.doFilter(RouteFilter.java:36)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:844)

打印出的SQL是这样的

SELECT 省略
       sys_user.id            as sys_user_z_id,
       
       sys_user.id            as sys_user_z_id,
       
       sys_user.id            as sys_user_z_id,
       
FROM bus_bid
       其他LEFT JOIN
       LEFT JOIN sys_user ON bus_bid.brokerId = sys_user.id
       LEFT JOIN sys_user ON bus_bid.cusMgrId = sys_user.id
       LEFT JOIN sys_user ON bus_bid.teamMgrId = sys_user.id;

因为三个@One属性是指向sys_user的

[DEBUG] 2018-08-06 09:46:10,802 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) - SELECT bus_bid.id as id,bus_bid.conNo as conNo,bus_bid.subId as subId,bus_bid.cusId as cusId,bus_bid.amount as amount,bus_bid.bankId as bankId,bus_bid.mgrId as mgrId,bus_bid.unitId as unitId,bus_bid.unitPath as unitPath,bus_bid.plusRate as plusRate,bus_bid.brokerId as brokerId,bus_bid.cpsId as cpsId,bus_bid.cusMgrId as cusMgrId,bus_bid.preId as preId,bus_bid.teamMgrId as teamMgrId,bus_bid.bidAt as bidAt,bus_bid.returnAt as returnAt,bus_bid.firstFlag as firstFlag,bus_bid.status as status,bus_bid.remark as remark,bus_bid.opBy as opBy,bus_bid.opAt as opAt,bus_bid.delFlag as delFlag,bus_bid.crtBy as crtBy,bus_bid.crtAt as crtAt , bus_subject.id as bus_subject_z_id,bus_subject.subNo as bus_subject_z_subNo,bus_subject.conNo as bus_subject_z_conNo,bus_subject.company as bus_subject_z_company,bus_subject.bankId as bus_subject_z_bankId,bus_subject.amount as bus_subject_z_amount,bus_subject.term as bus_subject_z_term,bus_subject.returnRate as bus_subject_z_returnRate,bus_subject.startAt as bus_subject_z_startAt,bus_subject.guarantee as bus_subject_z_guarantee,bus_subject.bidAmount as bus_subject_z_bidAmount,bus_subject.status as bus_subject_z_status,bus_subject.remark as bus_subject_z_remark,bus_subject.opBy as bus_subject_z_opBy,bus_subject.opAt as bus_subject_z_opAt,bus_subject.delFlag as bus_subject_z_delFlag,bus_subject.crtBy as bus_subject_z_crtBy,bus_subject.crtAt as bus_subject_z_crtAt , bus_customer.id as bus_customer_z_id,bus_customer.mobile as bus_customer_z_mobile,bus_customer.idCard as bus_customer_z_idCard,bus_customer.name as bus_customer_z_name,bus_customer.cusMgrId as bus_customer_z_cusMgrId,bus_customer.teamMgrId as bus_customer_z_teamMgrId,bus_customer.brokerId as bus_customer_z_brokerId,bus_customer.remark as bus_customer_z_remark,bus_customer.cusType as bus_customer_z_cusType,bus_customer.opBy as bus_customer_z_opBy,bus_customer.opAt as bus_customer_z_opAt,bus_customer.delFlag as bus_customer_z_delFlag,bus_customer.crtBy as bus_customer_z_crtBy,bus_customer.crtAt as bus_customer_z_crtAt , bus_bank.id as bus_bank_z_id,bus_bank.cardNo as bus_bank_z_cardNo,bus_bank.bankAddr as bus_bank_z_bankAddr,bus_bank.idCard as bus_bank_z_idCard,bus_bank.userName as bus_bank_z_userName,bus_bank.bankType as bus_bank_z_bankType,bus_bank.cusId as bus_bank_z_cusId,bus_bank.remark as bus_bank_z_remark,bus_bank.opBy as bus_bank_z_opBy,bus_bank.opAt as bus_bank_z_opAt,bus_bank.delFlag as bus_bank_z_delFlag,bus_bank.crtBy as bus_bank_z_crtBy,bus_bank.crtAt as bus_bank_z_crtAt , sys_unit.id as sys_unit_z_id,sys_unit.parentId as sys_unit_z_parentId,sys_unit.path as sys_unit_z_path,sys_unit.name as sys_unit_z_name,sys_unit.aliasName as sys_unit_z_aliasName,sys_unit.unitcode as sys_unit_z_unitcode,sys_unit.note as sys_unit_z_note,sys_unit.address as sys_unit_z_address,sys_unit.telephone as sys_unit_z_telephone,sys_unit.email as sys_unit_z_email,sys_unit.website as sys_unit_z_website,sys_unit.location as sys_unit_z_location,sys_unit.hasChildren as sys_unit_z_hasChildren,sys_unit.chargeId as sys_unit_z_chargeId,sys_unit.opBy as sys_unit_z_opBy,sys_unit.opAt as sys_unit_z_opAt,sys_unit.delFlag as sys_unit_z_delFlag,sys_unit.crtBy as sys_unit_z_crtBy,sys_unit.crtAt as sys_unit_z_crtAt , sys_user.id as sys_user_z_id,sys_user.loginname as sys_user_z_loginname,sys_user.password as sys_user_z_password,sys_user.salt as sys_user_z_salt,sys_user.nickname as sys_user_z_nickname,sys_user.isOnline as sys_user_z_isOnline,sys_user.disabled as sys_user_z_disabled,sys_user.email as sys_user_z_email,sys_user.loginAt as sys_user_z_loginAt,sys_user.loginIp as sys_user_z_loginIp,sys_user.loginCount as sys_user_z_loginCount,sys_user.customMenu as sys_user_z_customMenu,sys_user.loginTheme as sys_user_z_loginTheme,sys_user.loginSidebar as sys_user_z_loginSidebar,sys_user.loginBoxed as sys_user_z_loginBoxed,sys_user.loginScroll as sys_user_z_loginScroll,sys_user.loginPjax as sys_user_z_loginPjax,sys_user.unitid as sys_user_z_unitid,sys_user.userType as sys_user_z_userType,sys_user.cusMgrId as sys_user_z_cusMgrId,sys_user.idCard as sys_user_z_idCard,sys_user.mobile as sys_user_z_mobile,sys_user.entryDate as sys_user_z_entryDate,sys_user.bankId as sys_user_z_bankId,sys_user.status as sys_user_z_status,sys_user.opBy as sys_user_z_opBy,sys_user.opAt as sys_user_z_opAt,sys_user.delFlag as sys_user_z_delFlag,sys_user.crtBy as sys_user_z_crtBy,sys_user.crtAt as sys_user_z_crtAt , sys_user.id as sys_user_z_id,sys_user.loginname as sys_user_z_loginname,sys_user.password as sys_user_z_password,sys_user.salt as sys_user_z_salt,sys_user.nickname as sys_user_z_nickname,sys_user.isOnline as sys_user_z_isOnline,sys_user.disabled as sys_user_z_disabled,sys_user.email as sys_user_z_email,sys_user.loginAt as sys_user_z_loginAt,sys_user.loginIp as sys_user_z_loginIp,sys_user.loginCount as sys_user_z_loginCount,sys_user.customMenu as sys_user_z_customMenu,sys_user.loginTheme as sys_user_z_loginTheme,sys_user.loginSidebar as sys_user_z_loginSidebar,sys_user.loginBoxed as sys_user_z_loginBoxed,sys_user.loginScroll as sys_user_z_loginScroll,sys_user.loginPjax as sys_user_z_loginPjax,sys_user.unitid as sys_user_z_unitid,sys_user.userType as sys_user_z_userType,sys_user.cusMgrId as sys_user_z_cusMgrId,sys_user.idCard as sys_user_z_idCard,sys_user.mobile as sys_user_z_mobile,sys_user.entryDate as sys_user_z_entryDate,sys_user.bankId as sys_user_z_bankId,sys_user.status as sys_user_z_status,sys_user.opBy as sys_user_z_opBy,sys_user.opAt as sys_user_z_opAt,sys_user.delFlag as sys_user_z_delFlag,sys_user.crtBy as sys_user_z_crtBy,sys_user.crtAt as sys_user_z_crtAt , sys_user.id as sys_user_z_id,sys_user.loginname as sys_user_z_loginname,sys_user.password as sys_user_z_password,sys_user.salt as sys_user_z_salt,sys_user.nickname as sys_user_z_nickname,sys_user.isOnline as sys_user_z_isOnline,sys_user.disabled as sys_user_z_disabled,sys_user.email as sys_user_z_email,sys_user.loginAt as sys_user_z_loginAt,sys_user.loginIp as sys_user_z_loginIp,sys_user.loginCount as sys_user_z_loginCount,sys_user.customMenu as sys_user_z_customMenu,sys_user.loginTheme as sys_user_z_loginTheme,sys_user.loginSidebar as sys_user_z_loginSidebar,sys_user.loginBoxed as sys_user_z_loginBoxed,sys_user.loginScroll as sys_user_z_loginScroll,sys_user.loginPjax as sys_user_z_loginPjax,sys_user.unitid as sys_user_z_unitid,sys_user.userType as sys_user_z_userType,sys_user.cusMgrId as sys_user_z_cusMgrId,sys_user.idCard as sys_user_z_idCard,sys_user.mobile as sys_user_z_mobile,sys_user.entryDate as sys_user_z_entryDate,sys_user.bankId as sys_user_z_bankId,sys_user.status as sys_user_z_status,sys_user.opBy as sys_user_z_opBy,sys_user.opAt as sys_user_z_opAt,sys_user.delFlag as sys_user_z_delFlag,sys_user.crtBy as sys_user_z_crtBy,sys_user.crtAt as sys_user_z_crtAt FROM bus_bid LEFT JOIN bus_subject ON bus_bid.subId = bus_subject.id LEFT JOIN bus_customer ON bus_bid.cusId = bus_customer.id LEFT JOIN bus_bank ON bus_bid.bankId = bus_bank.id LEFT JOIN sys_unit ON bus_bid.unitId = sys_unit.id LEFT JOIN sys_user ON bus_bid.brokerId = sys_user.id LEFT JOIN sys_user ON bus_bid.cusMgrId = sys_user.id LEFT JOIN sys_user ON bus_bid.teamMgrId = sys_user.id 
[DEBUG] 2018-08-06 09:46:10,806 org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:97) - SQLException
java.sql.SQLSyntaxErrorException: Not unique table/alias: 'sys_user'
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:536)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:513)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:115)
	at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:1983)
	at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:1936)
	at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1422)
	at com.alibaba.druid.filter.FilterChainImpl.statement_executeQuery(FilterChainImpl.java:2473)
	at com.alibaba.druid.filter.FilterAdapter.statement_executeQuery(FilterAdapter.java:2503)
	at com.alibaba.druid.filter.FilterEventAdapter.statement_executeQuery(FilterEventAdapter.java:302)
	at com.alibaba.druid.filter.FilterChainImpl.statement_executeQuery(FilterChainImpl.java:2470)
	at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.executeQuery(StatementProxyImpl.java:221)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:217)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(NutDaoExecutor.java:246)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:53)
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor._exec(CachedNutDaoExecutor.java:319)
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:188)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66)
	at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)
	at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:159)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:126)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:93)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:82)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:240)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:252)
	at org.nutz.dao.impl.NutDao.queryByJoin(NutDao.java:1214)
	at org.nutz.dao.impl.NutDao.queryByJoin(NutDao.java:1204)
	at com.ttjrcs.common.base.Service.queryByJoin(Service.java:698)
	at com.ttjrcs.modules.controllers.business.BusRecordController.export(BusRecordController.java:173)
	at com.ttjrcs.modules.controllers.business.BusRecordController$FM$export$53fc47ffb6a404eaa8129ae58ad9e3b8.invoke(BusRecordController.java)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:38)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.ttjrcs.common.processor.XssSqlFilterProcessor.process(XssSqlFilterProcessor.java:37)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.ttjrcs.common.processor.TtjrcsShiroProcessor.process(TtjrcsShiroProcessor.java:55)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.ttjrcs.common.processor.GlobalsSettingProcessor.process(GlobalsSettingProcessor.java:39)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.ttjrcs.common.processor.LogTimeProcessor.process(LogTimeProcessor.java:24)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.ttjrcs.common.filter.RouteFilter.doFilter(RouteFilter.java:36)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:844)
[DEBUG] 2018-08-06 09:46:10,811 com.ttjrcs.common.processor.LogTimeProcessor.process(LogTimeProcessor.java:29) - [POST]URI=/platform/business/record/export 10ms
[WARN ] 2018-08-06 09:46:10,811 org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:28) - Error@/platform/business/record/export :
org.nutz.dao.DaoException: !Nutz SQL Error: 'SELECT bus_bid.id as id,bus_bid.conNo as conNo,bus_bid.subId as subId,bus_bid.cusId as cusId,bus_bid.amount as amount,bus_bid.bankId as bankId,bus_bid.mgrId as mgrId,bus_bid.unitId as unitId,bus_bid.unitPath as unitPath,bus_bid.plusRate as plusRate,bus_bid.brokerId as brokerId,bus_bid.cpsId as cpsId,bus_bid.cusMgrId as cusMgrId,bus_bid.preId as preId,bus_bid.teamMgrId as teamMgrId,bus_bid.bidAt as bidAt,bus_bid.returnAt as returnAt,bus_bid.firstFlag as firstFlag,bus_bid.status as status,bus_bid.remark as remark,bus_bid.opBy as opBy,bus_bid.opAt as opAt,bus_bid.delFlag as delFlag,bus_bid.crtBy as crtBy,bus_bid.crtAt as crtAt , bus_subject.id as bus_subject_z_id,bus_subject.subNo as bus_subject_z_subNo,bus_subject.conNo as bus_subject_z_conNo,bus_subject.company as bus_subject_z_company,bus_subject.bankId as bus_subject_z_bankId,bus_subject.amount as bus_subject_z_amount,bus_subject.term as bus_subject_z_term,bus_subject.returnRate as bus_subject_z_returnRate,bus_subject.startAt as bus_subject_z_startAt,bus_subject.guarantee as bus_subject_z_guarantee,bus_subject.bidAmount as bus_subject_z_bidAmount,bus_subject.status as bus_subject_z_status,bus_subject.remark as bus_subject_z_remark,bus_subject.opBy as bus_subject_z_opBy,bus_subject.opAt as bus_subject_z_opAt,bus_subject.delFlag as bus_subject_z_delFlag,bus_subject.crtBy as bus_subject_z_crtBy,bus_subject.crtAt as bus_subject_z_crtAt , bus_customer.id as bus_customer_z_id,bus_customer.mobile as bus_customer_z_mobile,bus_customer.idCard as bus_customer_z_idCard,bus_customer.name as bus_customer_z_name,bus_customer.cusMgrId as bus_customer_z_cusMgrId,bus_customer.teamMgrId as bus_customer_z_teamMgrId,bus_customer.brokerId as bus_customer_z_brokerId,bus_customer.remark as bus_customer_z_remark,bus_customer.cusType as bus_customer_z_cusType,bus_customer.opBy as bus_customer_z_opBy,bus_customer.opAt as bus_customer_z_opAt,bus_customer.delFlag as bus_customer_z_delFlag,bus_customer.crtBy as bus_customer_z_crtBy,bus_customer.crtAt as bus_customer_z_crtAt , bus_bank.id as bus_bank_z_id,bus_bank.cardNo as bus_bank_z_cardNo,bus_bank.bankAddr as bus_bank_z_bankAddr,bus_bank.idCard as bus_bank_z_idCard,bus_bank.userName as bus_bank_z_userName,bus_bank.bankType as bus_bank_z_bankType,bus_bank.cusId as bus_bank_z_cusId,bus_bank.remark as bus_bank_z_remark,bus_bank.opBy as bus_bank_z_opBy,bus_bank.opAt as bus_bank_z_opAt,bus_bank.delFlag as bus_bank_z_delFlag,bus_bank.crtBy as bus_bank_z_crtBy,bus_bank.crtAt as bus_bank_z_crtAt , sys_unit.id as sys_unit_z_id,sys_unit.parentId as sys_unit_z_parentId,sys_unit.path as sys_unit_z_path,sys_unit.name as sys_unit_z_name,sys_unit.aliasName as sys_unit_z_aliasName,sys_unit.unitcode as sys_unit_z_unitcode,sys_unit.note as sys_unit_z_note,sys_unit.address as sys_unit_z_address,sys_unit.telephone as sys_unit_z_telephone,sys_unit.email as sys_unit_z_email,sys_unit.website as sys_unit_z_website,sys_unit.location as sys_unit_z_location,sys_unit.hasChildren as sys_unit_z_hasChildren,sys_unit.chargeId as sys_unit_z_chargeId,sys_unit.opBy as sys_unit_z_opBy,sys_unit.opAt as sys_unit_z_opAt,sys_unit.delFlag as sys_unit_z_delFlag,sys_unit.crtBy as sys_unit_z_crtBy,sys_unit.crtAt as sys_unit_z_crtAt , sys_user.id as sys_user_z_id,sys_user.loginname as sys_user_z_loginname,sys_user.password as sys_user_z_password,sys_user.salt as sys_user_z_salt,sys_user.nickname as sys_user_z_nickname,sys_user.isOnline as sys_user_z_isOnline,sys_user.disabled as sys_user_z_disabled,sys_user.email as sys_user_z_email,sys_user.loginAt as sys_user_z_loginAt,sys_user.loginIp as sys_user_z_loginIp,sys_user.loginCount as sys_user_z_loginCount,sys_user.customMenu as sys_user_z_customMenu,sys_user.loginTheme as sys_user_z_loginTheme,sys_user.loginSidebar as sys_user_z_loginSidebar,sys_user.loginBoxed as sys_user_z_loginBoxed,sys_user.loginScroll as sys_user_z_loginScroll,sys_user.loginPjax as sys_user_z_loginPjax,sys_user.unitid as sys_user_z_unitid,sys_user.userType as sys_user_z_userType,sys_user.cusMgrId as sys_user_z_cusMgrId,sys_user.idCard as sys_user_z_idCard,sys_user.mobile as sys_user_z_mobile,sys_user.entryDate as sys_user_z_entryDate,sys_user.bankId as sys_user_z_bankId,sys_user.status as sys_user_z_status,sys_user.opBy as sys_user_z_opBy,sys_user.opAt as sys_user_z_opAt,sys_user.delFlag as sys_user_z_delFlag,sys_user.crtBy as sys_user_z_crtBy,sys_user.crtAt as sys_user_z_crtAt , sys_user.id as sys_user_z_id,sys_user.loginname as sys_user_z_loginname,sys_user.password as sys_user_z_password,sys_user.salt as sys_user_z_salt,sys_user.nickname as sys_user_z_nickname,sys_user.isOnline as sys_user_z_isOnline,sys_user.disabled as sys_user_z_disabled,sys_user.email as sys_user_z_email,sys_user.loginAt as sys_user_z_loginAt,sys_user.loginIp as sys_user_z_loginIp,sys_user.loginCount as sys_user_z_loginCount,sys_user.customMenu as sys_user_z_customMenu,sys_user.loginTheme as sys_user_z_loginTheme,sys_user.loginSidebar as sys_user_z_loginSidebar,sys_user.loginBoxed as sys_user_z_loginBoxed,sys_user.loginScroll as sys_user_z_loginScroll,sys_user.loginPjax as sys_user_z_loginPjax,sys_user.unitid as sys_user_z_unitid,sys_user.userType as sys_user_z_userType,sys_user.cusMgrId as sys_user_z_cusMgrId,sys_user.idCard as sys_user_z_idCard,sys_user.mobile as sys_user_z_mobile,sys_user.entryDate as sys_user_z_entryDate,sys_user.bankId as sys_user_z_bankId,sys_user.status as sys_user_z_status,sys_user.opBy as sys_user_z_opBy,sys_user.opAt as sys_user_z_opAt,sys_user.delFlag as sys_user_z_delFlag,sys_user.crtBy as sys_user_z_crtBy,sys_user.crtAt as sys_user_z_crtAt , sys_user.id as sys_user_z_id,sys_user.loginname as sys_user_z_loginname,sys_user.password as sys_user_z_password,sys_user.salt as sys_user_z_salt,sys_user.nickname as sys_user_z_nickname,sys_user.isOnline as sys_user_z_isOnline,sys_user.disabled as sys_user_z_disabled,sys_user.email as sys_user_z_email,sys_user.loginAt as sys_user_z_loginAt,sys_user.loginIp as sys_user_z_loginIp,sys_user.loginCount as sys_user_z_loginCount,sys_user.customMenu as sys_user_z_customMenu,sys_user.loginTheme as sys_user_z_loginTheme,sys_user.loginSidebar as sys_user_z_loginSidebar,sys_user.loginBoxed as sys_user_z_loginBoxed,sys_user.loginScroll as sys_user_z_loginScroll,sys_user.loginPjax as sys_user_z_loginPjax,sys_user.unitid as sys_user_z_unitid,sys_user.userType as sys_user_z_userType,sys_user.cusMgrId as sys_user_z_cusMgrId,sys_user.idCard as sys_user_z_idCard,sys_user.mobile as sys_user_z_mobile,sys_user.entryDate as sys_user_z_entryDate,sys_user.bankId as sys_user_z_bankId,sys_user.status as sys_user_z_status,sys_user.opBy as sys_user_z_opBy,sys_user.opAt as sys_user_z_opAt,sys_user.delFlag as sys_user_z_delFlag,sys_user.crtBy as sys_user_z_crtBy,sys_user.crtAt as sys_user_z_crtAt FROM bus_bid LEFT JOIN bus_subject ON bus_bid.subId = bus_subject.id LEFT JOIN bus_customer ON bus_bid.cusId = bus_customer.id LEFT JOIN bus_bank ON bus_bid.bankId = bus_bank.id LEFT JOIN sys_unit ON bus_bid.unitId = sys_unit.id LEFT JOIN sys_user ON bus_bid.brokerId = sys_user.id LEFT JOIN sys_user ON bus_bid.cusMgrId = sys_user.id LEFT JOIN sys_user ON bus_bid.teamMgrId = sys_user.id '
PreparedStatement: 
'SELECT bus_bid.id as id,bus_bid.conNo as conNo,bus_bid.subId as subId,bus_bid.cusId as cusId,bus_bid.amount as amount,bus_bid.bankId as bankId,bus_bid.mgrId as mgrId,bus_bid.unitId as unitId,bus_bid.unitPath as unitPath,bus_bid.plusRate as plusRate,bus_bid.brokerId as brokerId,bus_bid.cpsId as cpsId,bus_bid.cusMgrId as cusMgrId,bus_bid.preId as preId,bus_bid.teamMgrId as teamMgrId,bus_bid.bidAt as bidAt,bus_bid.returnAt as returnAt,bus_bid.firstFlag as firstFlag,bus_bid.status as status,bus_bid.remark as remark,bus_bid.opBy as opBy,bus_bid.opAt as opAt,bus_bid.delFlag as delFlag,bus_bid.crtBy as crtBy,bus_bid.crtAt as crtAt , bus_subject.id as bus_subject_z_id,bus_subject.subNo as bus_subject_z_subNo,bus_subject.conNo as bus_subject_z_conNo,bus_subject.company as bus_subject_z_company,bus_subject.bankId as bus_subject_z_bankId,bus_subject.amount as bus_subject_z_amount,bus_subject.term as bus_subject_z_term,bus_subject.returnRate as bus_subject_z_returnRate,bus_subject.startAt as bus_subject_z_startAt,bus_subject.guarantee as bus_subject_z_guarantee,bus_subject.bidAmount as bus_subject_z_bidAmount,bus_subject.status as bus_subject_z_status,bus_subject.remark as bus_subject_z_remark,bus_subject.opBy as bus_subject_z_opBy,bus_subject.opAt as bus_subject_z_opAt,bus_subject.delFlag as bus_subject_z_delFlag,bus_subject.crtBy as bus_subject_z_crtBy,bus_subject.crtAt as bus_subject_z_crtAt , bus_customer.id as bus_customer_z_id,bus_customer.mobile as bus_customer_z_mobile,bus_customer.idCard as bus_customer_z_idCard,bus_customer.name as bus_customer_z_name,bus_customer.cusMgrId as bus_customer_z_cusMgrId,bus_customer.teamMgrId as bus_customer_z_teamMgrId,bus_customer.brokerId as bus_customer_z_brokerId,bus_customer.remark as bus_customer_z_remark,bus_customer.cusType as bus_customer_z_cusType,bus_customer.opBy as bus_customer_z_opBy,bus_customer.opAt as bus_customer_z_opAt,bus_customer.delFlag as bus_customer_z_delFlag,bus_customer.crtBy as bus_customer_z_crtBy,bus_customer.crtAt as bus_customer_z_crtAt , bus_bank.id as bus_bank_z_id,bus_bank.cardNo as bus_bank_z_cardNo,bus_bank.bankAddr as bus_bank_z_bankAddr,bus_bank.idCard as bus_bank_z_idCard,bus_bank.userName as bus_bank_z_userName,bus_bank.bankType as bus_bank_z_bankType,bus_bank.cusId as bus_bank_z_cusId,bus_bank.remark as bus_bank_z_remark,bus_bank.opBy as bus_bank_z_opBy,bus_bank.opAt as bus_bank_z_opAt,bus_bank.delFlag as bus_bank_z_delFlag,bus_bank.crtBy as bus_bank_z_crtBy,bus_bank.crtAt as bus_bank_z_crtAt , sys_unit.id as sys_unit_z_id,sys_unit.parentId as sys_unit_z_parentId,sys_unit.path as sys_unit_z_path,sys_unit.name as sys_unit_z_name,sys_unit.aliasName as sys_unit_z_aliasName,sys_unit.unitcode as sys_unit_z_unitcode,sys_unit.note as sys_unit_z_note,sys_unit.address as sys_unit_z_address,sys_unit.telephone as sys_unit_z_telephone,sys_unit.email as sys_unit_z_email,sys_unit.website as sys_unit_z_website,sys_unit.location as sys_unit_z_location,sys_unit.hasChildren as sys_unit_z_hasChildren,sys_unit.chargeId as sys_unit_z_chargeId,sys_unit.opBy as sys_unit_z_opBy,sys_unit.opAt as sys_unit_z_opAt,sys_unit.delFlag as sys_unit_z_delFlag,sys_unit.crtBy as sys_unit_z_crtBy,sys_unit.crtAt as sys_unit_z_crtAt , sys_user.id as sys_user_z_id,sys_user.loginname as sys_user_z_loginname,sys_user.password as sys_user_z_password,sys_user.salt as sys_user_z_salt,sys_user.nickname as sys_user_z_nickname,sys_user.isOnline as sys_user_z_isOnline,sys_user.disabled as sys_user_z_disabled,sys_user.email as sys_user_z_email,sys_user.loginAt as sys_user_z_loginAt,sys_user.loginIp as sys_user_z_loginIp,sys_user.loginCount as sys_user_z_loginCount,sys_user.customMenu as sys_user_z_customMenu,sys_user.loginTheme as sys_user_z_loginTheme,sys_user.loginSidebar as sys_user_z_loginSidebar,sys_user.loginBoxed as sys_user_z_loginBoxed,sys_user.loginScroll as sys_user_z_loginScroll,sys_user.loginPjax as sys_user_z_loginPjax,sys_user.unitid as sys_user_z_unitid,sys_user.userType as sys_user_z_userType,sys_user.cusMgrId as sys_user_z_cusMgrId,sys_user.idCard as sys_user_z_idCard,sys_user.mobile as sys_user_z_mobile,sys_user.entryDate as sys_user_z_entryDate,sys_user.bankId as sys_user_z_bankId,sys_user.status as sys_user_z_status,sys_user.opBy as sys_user_z_opBy,sys_user.opAt as sys_user_z_opAt,sys_user.delFlag as sys_user_z_delFlag,sys_user.crtBy as sys_user_z_crtBy,sys_user.crtAt as sys_user_z_crtAt , sys_user.id as sys_user_z_id,sys_user.loginname as sys_user_z_loginname,sys_user.password as sys_user_z_password,sys_user.salt as sys_user_z_salt,sys_user.nickname as sys_user_z_nickname,sys_user.isOnline as sys_user_z_isOnline,sys_user.disabled as sys_user_z_disabled,sys_user.email as sys_user_z_email,sys_user.loginAt as sys_user_z_loginAt,sys_user.loginIp as sys_user_z_loginIp,sys_user.loginCount as sys_user_z_loginCount,sys_user.customMenu as sys_user_z_customMenu,sys_user.loginTheme as sys_user_z_loginTheme,sys_user.loginSidebar as sys_user_z_loginSidebar,sys_user.loginBoxed as sys_user_z_loginBoxed,sys_user.loginScroll as sys_user_z_loginScroll,sys_user.loginPjax as sys_user_z_loginPjax,sys_user.unitid as sys_user_z_unitid,sys_user.userType as sys_user_z_userType,sys_user.cusMgrId as sys_user_z_cusMgrId,sys_user.idCard as sys_user_z_idCard,sys_user.mobile as sys_user_z_mobile,sys_user.entryDate as sys_user_z_entryDate,sys_user.bankId as sys_user_z_bankId,sys_user.status as sys_user_z_status,sys_user.opBy as sys_user_z_opBy,sys_user.opAt as sys_user_z_opAt,sys_user.delFlag as sys_user_z_delFlag,sys_user.crtBy as sys_user_z_crtBy,sys_user.crtAt as sys_user_z_crtAt , sys_user.id as sys_user_z_id,sys_user.loginname as sys_user_z_loginname,sys_user.password as sys_user_z_password,sys_user.salt as sys_user_z_salt,sys_user.nickname as sys_user_z_nickname,sys_user.isOnline as sys_user_z_isOnline,sys_user.disabled as sys_user_z_disabled,sys_user.email as sys_user_z_email,sys_user.loginAt as sys_user_z_loginAt,sys_user.loginIp as sys_user_z_loginIp,sys_user.loginCount as sys_user_z_loginCount,sys_user.customMenu as sys_user_z_customMenu,sys_user.loginTheme as sys_user_z_loginTheme,sys_user.loginSidebar as sys_user_z_loginSidebar,sys_user.loginBoxed as sys_user_z_loginBoxed,sys_user.loginScroll as sys_user_z_loginScroll,sys_user.loginPjax as sys_user_z_loginPjax,sys_user.unitid as sys_user_z_unitid,sys_user.userType as sys_user_z_userType,sys_user.cusMgrId as sys_user_z_cusMgrId,sys_user.idCard as sys_user_z_idCard,sys_user.mobile as sys_user_z_mobile,sys_user.entryDate as sys_user_z_entryDate,sys_user.bankId as sys_user_z_bankId,sys_user.status as sys_user_z_status,sys_user.opBy as sys_user_z_opBy,sys_user.opAt as sys_user_z_opAt,sys_user.delFlag as sys_user_z_delFlag,sys_user.crtBy as sys_user_z_crtBy,sys_user.crtAt as sys_user_z_crtAt FROM bus_bid LEFT JOIN bus_subject ON bus_bid.subId = bus_subject.id LEFT JOIN bus_customer ON bus_bid.cusId = bus_customer.id LEFT JOIN bus_bank ON bus_bid.bankId = bus_bank.id LEFT JOIN sys_unit ON bus_bid.unitId = sys_unit.id LEFT JOIN sys_user ON bus_bid.brokerId = sys_user.id LEFT JOIN sys_user ON bus_bid.cusMgrId = sys_user.id LEFT JOIN sys_user ON bus_bid.teamMgrId = sys_user.id '
CaseMessage=Not unique table/alias: 'sys_user'
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:104)
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor._exec(CachedNutDaoExecutor.java:319)
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:188)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66)
	at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)
	at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:159)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:126)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:93)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:82)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:240)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:252)
	at org.nutz.dao.impl.NutDao.queryByJoin(NutDao.java:1214)
	at org.nutz.dao.impl.NutDao.queryByJoin(NutDao.java:1204)
	at com.ttjrcs.common.base.Service.queryByJoin(Service.java:698)
	at com.ttjrcs.modules.controllers.business.BusRecordController.export(BusRecordController.java:173)
	at com.ttjrcs.modules.controllers.business.BusRecordController$FM$export$53fc47ffb6a404eaa8129ae58ad9e3b8.invoke(BusRecordController.java)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:38)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.ttjrcs.common.processor.XssSqlFilterProcessor.process(XssSqlFilterProcessor.java:37)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.ttjrcs.common.processor.TtjrcsShiroProcessor.process(TtjrcsShiroProcessor.java:55)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.ttjrcs.common.processor.GlobalsSettingProcessor.process(GlobalsSettingProcessor.java:39)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.ttjrcs.common.processor.LogTimeProcessor.process(LogTimeProcessor.java:24)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.ttjrcs.common.filter.RouteFilter.doFilter(RouteFilter.java:36)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.sql.SQLSyntaxErrorException: Not unique table/alias: 'sys_user'
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:536)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:513)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:115)
	at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:1983)
	at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:1936)
	at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1422)
	at com.alibaba.druid.filter.FilterChainImpl.statement_executeQuery(FilterChainImpl.java:2473)
	at com.alibaba.druid.filter.FilterAdapter.statement_executeQuery(FilterAdapter.java:2503)
	at com.alibaba.druid.filter.FilterEventAdapter.statement_executeQuery(FilterEventAdapter.java:302)
	at com.alibaba.druid.filter.FilterChainImpl.statement_executeQuery(FilterChainImpl.java:2470)
	at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.executeQuery(StatementProxyImpl.java:221)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:217)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(NutDaoExecutor.java:246)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:53)
	... 79 more

哦,生成的SQL不对了吧

嗯,如果有多个@One对应同一个实体类对象,生成的SQL中,对应的实体类对象没有区分。

xxxService.queryByJoin("^broker|cusMgr|teamMgr$", cnd);

是我的写法不对,还是queryByJoin方法的BUG?

看上去是bug,报个issue吧

@kartking 这个queryByJoin的bug我也遇到了,呜呜呜......
多个@One对应同一个实体类对象,生成的SQL中,对应的实体类对象没有区分,这是一种情况,还有一种情况是这样的:类A中哪怕只有一个@One,而这个@One对应的实体类也恰恰是A的时候,queryByJoin也会报错。

正在想怎么改代码。。。

已提交修改

大神,这个问题Nutz dao 如何解决的?@wendal @kartking

添加回复
请先登陆
回到顶部