From 14f3df3fa5f8b087b75ff4f4482da19a4cb65141 Mon Sep 17 00:00:00 2001 From: zzh <1368735060@qq.com> Date: Mon, 14 Sep 2026 18:13:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8B=E6=B8=B8=E9=A2=84=E6=8A=A5?= =?UTF-8?q?=E5=87=AD=E8=AF=81=E5=BF=AB=E7=85=A7=E6=95=B4=E5=A5=97=E5=90=8C?= =?UTF-8?q?=E6=BA=90=EF=BC=8C=E9=81=BF=E5=85=8D=E4=B8=8E=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=B7=B7=E6=8B=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- .../Shared/OrderDownstreamCredentialResolver.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Oms.Application/Shared/OrderDownstreamCredentialResolver.cs b/src/Oms.Application/Shared/OrderDownstreamCredentialResolver.cs index e3c52fb..587395e 100644 --- a/src/Oms.Application/Shared/OrderDownstreamCredentialResolver.cs +++ b/src/Oms.Application/Shared/OrderDownstreamCredentialResolver.cs @@ -17,7 +17,9 @@ public sealed class OrderDownstreamCredentials } /// -/// 解析订单下游 itfx 凭证(优先订单绑定字段,回退渠道分组)。 +/// 解析订单下游 itfx 凭证。 +/// 优先级:服务渠道规则快照(整套同源)→ 订单绑定字段 → 渠道分组实时查询。 +/// 快照命中时 SupplierCode/AppKey/AppSecret 必须同出快照,禁止与订单字段混拼。 /// public class OrderDownstreamCredentialResolver( IServiceChannelRepository serviceChannelRepository, @@ -213,23 +215,20 @@ public class OrderDownstreamCredentialResolver( return null; } + // 整套同源:禁止用订单 SupplierCode/AppKey 拼快照 AppSecret,避免两边发布不同步时混用。 var appSecret = downstream.AppSecret?.Trim(); if (string.IsNullOrWhiteSpace(appSecret)) { return null; } - var appKey = !string.IsNullOrWhiteSpace(order.DownstreamAppKey) - ? order.DownstreamAppKey.Trim() - : downstream.AppKey?.Trim(); + var appKey = downstream.AppKey?.Trim(); if (string.IsNullOrWhiteSpace(appKey)) { return null; } - var supplierCode = !string.IsNullOrWhiteSpace(order.DownstreamSupplierCode) - ? order.DownstreamSupplierCode.Trim() - : downstream.SupplierCode?.Trim(); + var supplierCode = downstream.SupplierCode?.Trim(); if (string.IsNullOrWhiteSpace(supplierCode)) { return null;