优化和平小店碎片兑换链路
This commit is contained in:
@@ -12,6 +12,10 @@ import (
|
||||
// runAttempt 标准模式兑换:完整执行鉴权 token→BatchLimit→PreExchange→Exchange 链路。
|
||||
func (s *Scheduler) runAttempt(attempt types.ExchangeAttempt) types.ExchangeResult {
|
||||
cli := s.clientSnapshot()
|
||||
// 最终防护:任何旧入口在和平小店活动下都必须使用 livebuy。
|
||||
if cli.Activity.IsXiaodian {
|
||||
return s.runXiaodianAttempt(attempt)
|
||||
}
|
||||
result := types.ExchangeResult{
|
||||
Account: attempt.Account.Name,
|
||||
Product: attempt.Product.CommodityName,
|
||||
@@ -101,6 +105,9 @@ func (s *Scheduler) runAttempt(attempt types.ExchangeAttempt) types.ExchangeResu
|
||||
// runAttemptFast 激进模式的兑换逻辑,复用缓存的鉴权 token,跳过 BatchExchangeLimit 和 PreExchange。
|
||||
func (s *Scheduler) runAttemptFast(attempt types.ExchangeAttempt) types.ExchangeResult {
|
||||
cli := s.clientSnapshot()
|
||||
if cli.Activity.IsXiaodian {
|
||||
return s.runXiaodianAttempt(attempt)
|
||||
}
|
||||
result := types.ExchangeResult{
|
||||
Account: attempt.Account.Name,
|
||||
Product: attempt.Product.CommodityName,
|
||||
|
||||
Reference in New Issue
Block a user