From 316ee6d135592d9187941720cc41130babf365a9 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Wed, 5 Aug 2026 17:52:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=A5=E7=BA=A6=E9=85=8D=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=20affiliate-dash=20=E8=A6=86=E7=9B=96=E6=94=B6=E5=B0=BE:prefer?= =?UTF-8?q?redMatchEnabled=20=E5=BC=80=E5=85=B3=E8=A1=A5=E5=85=A5=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E9=85=8D=E7=BD=AE=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 分析结论:履约路由面板已含 affiliate_dash(开关/优先级/规则),职责划分成立 - 缺口修复:指定匹配优先开关此前无 UI 入口,现平台配置 affiliate-dash tab 增加 Switch - 后端 effective 透出 preferredMatchEnabled;前端类型/panel 补齐 - 前后端 typecheck 通过,224 测试全绿 --- .../platform-config/affiliate-dash-service.ts | 1 + .../admin/platform/AdminPlatformShopsPage.tsx | 5 ++++ .../admin/platform-config/affiliate-dash.ts | 2 ++ .../affiliate-dash对接.md | 24 +++++++++++++++++++ 4 files changed, 32 insertions(+) diff --git a/apps/backend/src/services/admin/platform-config/affiliate-dash-service.ts b/apps/backend/src/services/admin/platform-config/affiliate-dash-service.ts index ed0009a6..1a559d52 100644 --- a/apps/backend/src/services/admin/platform-config/affiliate-dash-service.ts +++ b/apps/backend/src/services/admin/platform-config/affiliate-dash-service.ts @@ -72,6 +72,7 @@ function mapEffectiveAffiliateDashConfig(config: ReturnType 启用 + 映射命中优先 + BASE_URL diff --git a/apps/frontend/src/types/admin/platform-config/affiliate-dash.ts b/apps/frontend/src/types/admin/platform-config/affiliate-dash.ts index 5fa885d1..143001c4 100644 --- a/apps/frontend/src/types/admin/platform-config/affiliate-dash.ts +++ b/apps/frontend/src/types/admin/platform-config/affiliate-dash.ts @@ -7,6 +7,7 @@ export interface AdminAffiliateDashConfig { timeoutMs: number notifyUrl: string timestampToleranceSeconds: number + preferredMatchEnabled: boolean skuMapping: Record } @@ -16,6 +17,7 @@ export interface AdminAffiliateDashEffectiveConfig { timeoutMs: number notifyUrl: string timestampToleranceSeconds: number + preferredMatchEnabled: boolean hasAppKey: boolean hasAppSecret: boolean hasCallbackSecret: boolean diff --git a/docs/ affiliate_dash_发货平台/affiliate-dash对接.md b/docs/ affiliate_dash_发货平台/affiliate-dash对接.md index eebe417e..38ac9441 100644 --- a/docs/ affiliate_dash_发货平台/affiliate-dash对接.md +++ b/docs/ affiliate_dash_发货平台/affiliate-dash对接.md @@ -731,3 +731,27 @@ order_site 处理要求: - **履约配置**(`AdminPlatformFulfillmentPage`):履约路由、kuaishou-feifei 履约、kuaishou-lewan 履约 —— 通道路由与履约参数 **验证**:前端 `tsc -b --noEmit` 通过;后端未改动。 + +--- + +## 25. 履约配置页 affiliate-dash 覆盖分析(v2.10 · 已完成) + +**需求**:确认履约配置页是否也需要 affiliate-dash 相关内容(账号归平台配置页)。 + +### 分析结论 + +| 配置项 | 归属 | 现状 | +| --- | --- | --- | +| 对接凭据(appKey/appSecret/callbackSecret/baseUrl/timeout/容差) | 平台配置 | ✅ 平台配置页 affiliate-dash tab | +| 钱包 / 商品目录 / 映射测试 | 平台配置 | ✅ 平台配置页 affiliate-dash tab | +| 91 编码 → sku 映射表 | 平台配置 | ✅ 平台配置页 affiliate-dash tab | +| **履约路由**:通道开关(affiliate_dash enabled) | 履约配置 | ✅ 履约路由面板已含(ROUTING_EXECUTORS) | +| **通道优先级**(defaultExecutorPriority 含 affiliate_dash,可上移/下移) | 履约配置 | ✅ 履约路由面板已含 | +| **商品路由规则**(商品名 → affiliate_dash) | 履约配置 | ✅ 履约路由面板规则编辑器已含 | +| **指定匹配优先开关**(preferredMatchEnabled) | 平台配置 | ⚠️ 新增字段未暴露 UI → **本次已补** | + +**结论**:「账号在平台配置、路由在履约配置」的职责划分**已成立**——履约路由面板在阶段 3 就已纳入 affiliate_dash(通道开关/优先级/规则)。本次仅修复一个真实缺口:`preferredMatchEnabled`(映射命中优先,默认 true)此前只能靠默认值或环境变量,后台改不了;现已在平台配置 affiliate-dash tab 增加开关,前后端 effective/source 均透出。 + +**未新增**:履约配置页不加独立「affiliate-dash 履约面板」——feifei/lewan 有独立面板是因为履约参数多(productRules、deliveryItems 等),affiliate_dash 履约参数只有路由+优先级+规则,已覆盖,加面板属重复。 + +**验证**:前端 `tsc -b --noEmit` 通过;后端 typecheck 通过;224 测试全绿。