新增荣耀勋章/幸运币商品:迁移、上游商品映射与测试
This commit is contained in:
@@ -26,14 +26,14 @@ const defaultDeliveryBFFBaseURL = "https://www.jxya.top/bff-stg"
|
||||
|
||||
// 发货提交阶段,持久化在 result_data.provider_order_stage 中,供排障与补偿扫描区分处理。
|
||||
const (
|
||||
deliveryStageClaimed = "claimed" // 已锁定订单,尚未建 queue
|
||||
deliveryStageQueueCreated = "queue_created" // 已在上游建 queue,尚未生成正式订单
|
||||
deliveryStageSubmitted = "submitted" // 已在上游创建正式订单
|
||||
deliveryStageBindVerify = "bind_verify" // 绑定账号校验失败
|
||||
deliveryStageBindMismatch = "bind_mismatch" // 玩家编号与绑定账号不一致
|
||||
deliveryStageCreateQueue = "create_queue" // 创建上游 queue 失败
|
||||
deliveryStagePatchQueue = "patch_queue" // 补充 queue 账号信息失败
|
||||
deliveryStageCreateOrder = "create_upstream" // 创建上游正式订单失败
|
||||
deliveryStageClaimed = "claimed" // 已锁定订单,尚未建 queue
|
||||
deliveryStageQueueCreated = "queue_created" // 已在上游建 queue,尚未生成正式订单
|
||||
deliveryStageSubmitted = "submitted" // 已在上游创建正式订单
|
||||
deliveryStageBindVerify = "bind_verify" // 绑定账号校验失败
|
||||
deliveryStageBindMismatch = "bind_mismatch" // 玩家编号与绑定账号不一致
|
||||
deliveryStageCreateQueue = "create_queue" // 创建上游 queue 失败
|
||||
deliveryStagePatchQueue = "patch_queue" // 补充 queue 账号信息失败
|
||||
deliveryStageCreateOrder = "create_upstream" // 创建上游正式订单失败
|
||||
)
|
||||
|
||||
// deliverySubmittedUpstream 判断订单是否已成功提交到上游正式订单。
|
||||
@@ -959,6 +959,12 @@ func deliveryGoodID(channel, sku string) string {
|
||||
"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]
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,22 @@ func TestDeliveryLinkGenerateAuthorizeAndRevoke(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestDeliveryGoodIDIncludesMedalAndCoinProducts(t *testing.T) {
|
||||
cases := map[string]string{
|
||||
"honor_medal_x2": "682ef39ca8f40c4234c59f45",
|
||||
"honor_medal_x30": "682ef39ca8f40c4234c59f43",
|
||||
"honor_medal_x90": "682ef39ca8f40c4234c59f41",
|
||||
"lucky_coin_x2": "682ef39ca8f40c4234c59f46",
|
||||
"lucky_coin_x30": "682ef39ca8f40c4234c59f44",
|
||||
"lucky_coin_x90": "682ef39ca8f40c4234c59f42",
|
||||
}
|
||||
for sku, want := range cases {
|
||||
if got := deliveryGoodID("dlc", sku); got != want {
|
||||
t.Fatalf("unexpected good id for %s: got %q want %q", sku, got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestDeliveryMerchantApiBindAndSubmit(t *testing.T) {
|
||||
db := newServiceTestDB(t)
|
||||
merchantID, _ := seedFulfillmentMerchant(t, db, "delivery-api", 5000, 5, 100)
|
||||
|
||||
Reference in New Issue
Block a user