From 946c9abaca9d10c87bcc1af0c0c0f92125cd647a Mon Sep 17 00:00:00 2001 From: xiaolipro <2357729423@qq.com> Date: Tue, 15 Sep 2026 18:09:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=BC=E5=AE=B9account=E5=8D=A0?= =?UTF-8?q?=E4=BD=8D=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/InterfaceForwardCommon.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/InterfaceForward.Application/Services/InterfaceForwardCommon.cs b/src/InterfaceForward.Application/Services/InterfaceForwardCommon.cs index 48c6b3d..1b902d5 100644 --- a/src/InterfaceForward.Application/Services/InterfaceForwardCommon.cs +++ b/src/InterfaceForward.Application/Services/InterfaceForwardCommon.cs @@ -173,7 +173,19 @@ public class InterfaceForwardCommon( foreach (var item in configs.Where(x => x.Flag == AuthParameterFlag.InParameter)) { Debug.Assert(item.ParameterAlias != null, "item.ParameterAlias != null"); - body[item.ParameterAlias] = item.Value1; + + // 兼容account占位符 + if (item.Value1 == GlobalConst.FromAccount) + { + body[item.ParameterAlias] = + accountFieldCache.FirstOrDefault(x => + x.FieldName.Equals(item.ParameterAlias, StringComparison.OrdinalIgnoreCase))?.FieldValue ?? + string.Empty; + } + else + { + body[item.ParameterAlias] = item.Value1; + } } // 构建授权上下文 @@ -208,7 +220,8 @@ public class InterfaceForwardCommon( // 授权也走主流程 if (!cacheContext.TargetServiceProvider.AuthInterfaceCode.IsNullOrWhiteSpace()) { - Debug.Assert(cacheContext.ServiceProviderAuthInterface != null, "cacheContext.ServiceProviderAuthInterface != null"); + Debug.Assert(cacheContext.ServiceProviderAuthInterface != null, + "cacheContext.ServiceProviderAuthInterface != null"); var flow = GetForwardFlow(cacheContext.ServiceProviderAuthInterface.TargetInterface.FlowCode!); _flows.Add(cacheContext.ServiceProviderAuthInterface.TargetInterface.Code, flow); } @@ -386,7 +399,7 @@ public class InterfaceForwardCommon( // 关联当前服务商日志 logRepository.ServiceProviderRequestLog = context.ServiceProviderRequestLog; - if (!context.Feature.IsWait) // 批量case服务商日志延迟到 handle中处理 + if (!context.Feature.IsWait) // 批量case服务商日志延迟到 handle中处理 { // 写服务商日志 await logRepository.AddLogAsync(context.ServiceProviderRequestLog);