fix(fulfillment): 收口渠道商品与统一结算边界

This commit is contained in:
yml2213
2026-11-06 17:12:44 +08:00
parent e6b3835c9f
commit a333c05df4
23 changed files with 1113 additions and 106 deletions
+15
View File
@@ -195,6 +195,21 @@ POST /api/v1/admin/cost-center/voucher-products
通用 `POST /api/v1/admin/cost-center/products` 不再接受 `tpv:` 和 `man:`。
迁移 `143` 负责修复历史卡券商品归属。
### 4.5 商品来源隔离(现行)
订单项一旦已确定履约渠道,商品归一只能命中该渠道来源:
```text
affiliate_dash → aff:
work_order → tpl: / wo:
third_party_voucher → tpv:
manual → man:
on_account → man:
```
缺少渠道专属商品时进入 `product_mapping_missing`,不得继续按同名商品借用其他来源。
商品归一任务会清除已有错误来源关联并重新挂载正确商品。
## 五、成本版本接口
路径不变,字段不变:
+3
View File
@@ -91,6 +91,9 @@ orders ──┬── order_items ──── fulfillment_channel + fulfillmen
新增或保存配置时,系统在同一业务流程内创建或复用标准商品,并同步人工渠道规则。
商品目录中的 `man:` 商品因此是人工配置的派生结果。
已确定履约渠道的订单项必须使用对应来源商品,不能按同名商品跨渠道兜底。统一结算金额
未对账前只生成 `pending` 虚拟账单,不生成 0 元 actual 成本快照;确认对账后才写入实际成本。
---
## 二、商品主数据