查询错误Unknown column ‘tb.create_user_id’ in ‘where clause’【请确认参数传递或者配置是否正确

查看SQL语句是否正确



{success: false, title: null,…}
error: {httpTraceId: "0HMAN3MNAMBJH:00000004", httpMethod: "GET", httpStatusCode: 200, errorCode: 17001,…}
errorCode: 17001
errorText: "【bt.resource-type-statistics.tbr-it】 select it_id,bd_tbr_idcard,it_name,max(bd_tbr) bd_tbr,sum(mq_price) mq_price from (  select  tb_pi.policy_item_name,tb_t.it_name,tb_t.it_id,tb_t.parent_id, tb_f.family_name,tb_f.family_id,  tb_p.bd_tbr,tb_p.bd_bbr,tb_pi.mq_price,tb_pi.bz_price,tb_pi.policy_id,tb_p.bd_bbr_idcard,tb_p.bd_tbr_idcard  ,tb_p.bd_start_date,tb_pi.bz_jf_method,tb_pi.xf_year,tb_pi.bd_year  from bt_family tb_f   left join bt_policy tb_p on (tb_p.family_id=tb_f.family_id)   left join bt_policy_item tb_pi on (tb_pi.policy_id=tb_p.policy_id)   left join bt_insurance_type tb_t on (FIND_IN_SET(tb_t.it_id,tb_pi.it_name)>0)    where tb_f.create_user_id=@_userId  or tb.create_user_id in @_mergeUserId  and month(tb_p.bd_start_date)=@paymentMonth and tb_t.parent_id='0' ) t where it_id is not null group by bd_tbr_idcard,it_id order by bd_tbr_idcard 查询错误Unknown column 'tb.create_user_id' in 'where clause'【请确认参数传递或者配置是否正确 select it_id,bd_tbr_idcard,it_name,max(bd_tbr) bd_tbr,sum(mq_price) mq_price from (  select  tb_pi.policy_item_name,tb_t.it_name,tb_t.it_id,tb_t.parent_id, tb_f.family_name,tb_f.family_id,  tb_p.bd_tbr,tb_p.bd_bbr,tb_pi.mq_price,tb_pi.bz_price,tb_pi.policy_id,tb_p.bd_bbr_idcard,tb_p.bd_tbr_idcard  ,tb_p.bd_start_date,tb_pi.bz_jf_method,tb_pi.xf_year,tb_pi.bd_year  from bt_family tb_f   left join bt_policy tb_p on (tb_p.family_id=tb_f.family_id)   left join bt_policy_item tb_pi on (tb_pi.policy_id=tb_p.policy_id)   left join bt_insurance_type tb_t on (FIND_IN_SET(tb_t.it_id,tb_pi.it_name)>0)    where tb_f.create_user_id=@_userId  or tb.create_user_id in @_mergeUserId  and month(tb_p.bd_start_date)=@paymentMonth and tb_t.parent_id='0' ) t where it_id is not null group by bd_tbr_idcard,it_id order by bd_tbr_idcard 】。"
help: "https://doc.rg1008.com"
httpMethod: "GET"
httpStatusCode: 200
httpTraceId: "0HMAN3MNAMBJH:00000004"
message: "Exception of type 'RG3.PF.Abstractions.Exceptions.BizException' was thrown."
stack: "   at RG3.DO.Core.DbContext.QueryDataTableImpl(PFGlobalParameter pfParams, BCDbConnection connection, String sql, Object param, ColumnNameCase columnNameCase, CommandSource commandSource) in C:\\0_RG\\Code\\rg3-pf\\RG3.DO.Core\\DbContext.Query.cs:line 281
↵   at RG3.DO.Core.DbContext.QueryDataTable(PFGlobalParameter pfParams, BCDbConnection connection, String sql, Object param, ColumnNameCase columnNameCase) in C:\\0_RG\\Code\\rg3-pf\\RG3.DO.Core\\DbContext.Query.cs:line 243
↵   at RG3.BO.Qu.Repository.ListRepository.List(PFGlobalParameter pf, String mkey, String resField, Dictionary`2 dictionaryUrl) in C:\\0_RG\\Code\\rg3-pf\\RG3.BO.Qu\\Repository\\ListRepository.cs:line 105
↵   at RG3.BO.Qu.Services.ListService.ListJson(PFGlobalParameter pf, String mkey, String resField, Dictionary`2 dictionaryUrl) in C:\\0_RG\\Code\\rg3-pf\\RG3.BO.Qu\\Services\\ListService.cs:line 143
↵   at RG3.BO.Qu.Services.ListService.ListUsed(String mkey, String resField, JToken jparams, HttpContext httpContext) in C:\\0_RG\\Code\\rg3-pf\\RG3.BO.Qu\\Services\\ListService.cs:line 287
↵   at RG3.PF.Qu.Controller.ListController.ListPost(String mkey, String resField, JToken jparams) in C:\\0_RG\\Code\\rg3-pf\\RG3.BO.Qu\\Controller\\ListController.cs:line 109
↵   at RG3.PF.Qu.Controller.ListController.List(String mkey, String resField) in C:\\0_RG\\Code\\rg3-pf\\RG3.BO.Qu\\Controller\\ListController.cs:line 93
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
↵--- End of stack trace from previous location where exception was thrown ---
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
↵   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
↵   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
↵   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
↵   at RG3.PF.Abstractions.Middlewares.GlobalExceptionMiddleware.Invoke(HttpContext context) in C:\\0_RG\\Code\\rg3-pf\\RG3.PF.Abstractions\\Middlewares\\GlobalExceptionMiddleware.cs:line 52"
success: false
title: null
文档更新时间: 2021-08-04 08:00   作者:admin