Duplicate entry(双重输入)
RG3.BO.DB\\Services\\DbExecuteService$Update.cs:line 230
{
success: false,
title: null,
error: {
httpTraceId: "0HMAI943TV1HF:0000000A",
httpMethod: "PUT",
httpStatusCode: 200,
errorCode: 99999,
errorText:
"Duplicate entry \\u00271-bt-deve-bt-20200-247148cb-667d-4c3-member\\u0027 for key \\u0027bo_user_role.PRIMARY\\u0027\\u3010insert into bo_user_role (role_id,user_id) values (@roleId,@userId);\\u3011[insert into bo_user_role (role_id,user_id) values (@roleId,@userId);]",
message:
"Exception of type \\u0027RG3.PF.Abstractions.Exceptions.BizException\\u0027 was thrown.",
stack:
" at RG3.BO.DB.Services.DbExecuteService.StarEdit(PFGlobalParameter pf, BCDbConnection dbConnection, IDbTransaction dbTransaction, SqlConfig sqlConfig, JObject jObject, Dictionary\\u00602 dictionaryUrl, String securityMethod, RequestModuleType fromRmt) in C:\\\\0_RG\\\\Code\\\\rg3-pf\\\\RG3.BO.DB\\\\Services\\\\DbExecuteService$Update.cs:line 230\\r\\n at RG3.BO.DB.Services.DbExecuteService.StarEdit(PFGlobalParameter pf, SqlConfig sqlConfig, JObject jObject, Dictionary\\u00602 dictionaryUrl, String securityMethod) in C:\\\\0_RG\\\\Code\\\\rg3-pf\\\\RG3.BO.DB\\\\Services\\\\DbExecuteService$Update.cs:line 45\\r\\n at RG3.BO.Op.Services.EditService.Edit(PFGlobalParameter pf, String mkey, String resField, Dictionary\\u00602 dictionaryUrl, SqlConfig\\u0026 sqlConfig, JObject jObject) in C:\\\\0_RG\\\\Code\\\\rg3-pf\\\\RG3.BO.Op\\\\Services\\\\EditService.cs:line 94\\r\\n at RG3.PF.Op.Controller.EditController.Edit(JObject jobject, String mkey, String resField) in C:\\\\0_RG\\\\Code\\\\rg3-pf\\\\RG3.BO.Op\\\\Controller\\\\EditController.cs:line 73\\r\\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\\r\\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\\u003CInvokeActionMethodAsync\\u003Eg__Awaited|12_0(ControllerActionInvoker invoker, ValueTask\\u00601 actionResultValueTask)\\r\\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\\u003CInvokeNextActionFilterAsync\\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\\r\\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\\r\\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\\u0026 next, Scope\\u0026 scope, Object\\u0026 state, Boolean\\u0026 isCompleted)\\r\\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\\u003CInvokeFilterPipelineAsync\\u003Eg__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\\r\\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\\u003CInvokeAsync\\u003Eg__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\\r\\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.\\u003CInvoke\\u003Eg__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\\r\\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\\r\\n at RG3.PF.Abstractions.Middlewares.GlobalExceptionMiddleware.Invoke(HttpContext context) in C:\\\\0_RG\\\\Code\\\\rg3-pf\\\\RG3.PF.Abstractions\\\\Middlewares\\\\GlobalExceptionMiddleware.cs:line 46",
help: "{error.ErrorCode}",
},
}
方案一、RG3.BO.DB.dll 升级到最新版本
方案二、mapper里面注释掉guidmethod
文档更新时间: 2022-10-24 13:49 作者:admin