refactor(delivery): 按职责拆分 delivery.go(1162 → 最大 249 行)

纯文件级移动,无行为变更:
- delivery.go            常量、DeliveryService 结构、构造与依赖注入
- delivery_types.go      对外 DTO 与 deliveryHTTPError
- delivery_provider.go   渠道取消/同步与 result_data 维护
- delivery_query.go      订单查询与发货状态构建
- delivery_bind.go       绑定与绑定结果查询
- delivery_submit.go     提交发货与提交阶段状态机
- deliveryGoodID 并入 delivery_helpers.go,链接管理并入 delivery_link.go

校验:拆分前后 55 个 func/type/const 声明完全一致(无缺失、无多出、无重复)。
This commit is contained in:
yml2213
2026-10-06 19:43:05 +08:00
parent 80e2bbf875
commit 24fa6a97a0
8 changed files with 1091 additions and 1047 deletions
@@ -75,3 +75,44 @@ func truncateDeliveryText(value string) string {
}
return value[:300]
}
func deliveryGoodID(channel, sku string) string {
if channel != "dlc" {
return ""
}
return map[string]string{
"suit_alan_walker": "682ef3c5a8f40c4234c59f47",
"suit_shadow_gothic": "682ef39ca8f40c4234c59f36",
"top_black_elite_trainer": "682ef39ca8f40c4234c59f37",
"m416_hamster_gray": "682ef3c5a8f40c4234c59f52",
"bag_cute_bear": "682ef3c5a8f40c4234c59f4a",
"suit_dual_fluffy": "682ef3c5a8f40c4234c59f49",
"suit_pink_sheep": "682ef3c5a8f40c4234c59f4d",
"suit_first_peach": "682ef3c5a8f40c4234c59f48",
"suit_romantic_destiny": "682ef39ca8f40c4234c59f38",
"pack_western_cowboy": "682ef3c5a8f40c4234c59f4c",
"smoke_pink_sheep": "682ef3c5a8f40c4234c59f50",
"frag_pink_sheep": "682ef3c5a8f40c4234c59f51",
"suit_hamster_gray": "682ef3c5a8f40c4234c59f53",
"suit_cute_bear": "682ef3c5a8f40c4234c59f4b",
"bag_pink_sheep": "682ef3c5a8f40c4234c59f4f",
"helmet_pink_sheep": "682ef3c5a8f40c4234c59f4e",
"bag_hamster_gray": "682ef3c5a8f40c4234c59f55",
"helmet_hamster_gray": "682ef3c5a8f40c4234c59f54",
"suit_western_mystery": "682ef39ca8f40c4234c59f35",
"helmet_panda_treasure": "682ef39ca8f40c4234c59f39",
"suit_panda_round": "682ef39ca8f40c4234c59f3a",
"suit_panda_tuan": "682ef39ca8f40c4234c59f3b",
"pack_lava_ranger": "682ef39ca8f40c4234c59f3c",
"suit_sand_dancer": "682ef39ca8f40c4234c59f3d",
"pack_star_roam_outfit": "682ef39ca8f40c4234c59f3e",
"pack_star_roam_weapon": "682ef39ca8f40c4234c59f3f",
"suit_cloud_bear": "682ef39ca8f40c4234c59f40",
"honor_medal_x2": "682ef39ca8f40c4234c59f45",
"honor_medal_x30": "682ef39ca8f40c4234c59f43",
"honor_medal_x90": "682ef39ca8f40c4234c59f41",
"lucky_coin_x2": "682ef39ca8f40c4234c59f46",
"lucky_coin_x30": "682ef39ca8f40c4234c59f44",
"lucky_coin_x90": "682ef39ca8f40c4234c59f42",
}[sku]
}