feat(v2): gateway 经 Picker 路由选账户 + retry 换号(ExcludeAccounts);替换首个 enabled

This commit is contained in:
wangjia
2026-07-10 14:02:33 +08:00
parent 381288e707
commit c06f6d3a3c
7 changed files with 109 additions and 17 deletions
+2 -1
View File
@@ -120,8 +120,9 @@ func TestSettleTransientReadErrorIsFailed(t *testing.T) {
areg := accounts.New([]config.AccountConfig{
{AccountID: "fake-a1", Channel: "fake", Region: "global", Enabled: true, Weight: 1},
})
picker := accounts.NewRouter(areg, nil, nil)
spy := &spyEnqueuer{}
g := gateway.New(orders, preg, areg, stubResolver{}, spy, "global")
g := gateway.New(orders, preg, picker, stubResolver{}, spy, "global")
ctx := context.Background()
g.CreateOrder(ctx, gateway.CreateOrderInput{SKU: "pro_year", Method: "fake", BizSystem: "pangolin", BizRef: "u-1"})