feat(routing): 渠道配置页把 Rock 作为独立履约策略展示

最新的 Rock 商品之前被算进第一平台,配置里也无法单独选择 Rock 库存池。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yml2213
2026-10-05 21:15:20 +08:00
co-authored by Cursor
parent 8c43fb4569
commit 4c68103217
4 changed files with 81 additions and 9 deletions
@@ -55,6 +55,11 @@ func TestParseProductRoutingConfig(t *testing.T) {
if cfg5.DLCGoodID != "682ef39ca8f40c4234c59f38" {
t.Fatalf("expected builtin DLC good id, got %s", cfg5.DLCGoodID)
}
cfgRock := ParseProductRoutingConfig(`{"routing_mode":"rock","priority":["rock"],"delivery_type":"LINK_BINDING"}`, "rock_black_tshirt")
if cfgRock.RoutingMode != RoutingModeRock || len(cfgRock.Priority) != 1 || cfgRock.Priority[0] != ProviderRock {
t.Fatalf("expected rock-only routing, got %+v", cfgRock)
}
}
func TestFulfillmentRouterResolution(t *testing.T) {