fix(card_sender): 修复代理获取使用错误的参数问题

- 将获取代理时传入的ID参数由随机生成改为使用LocalOrderID
- 添加日志记录代理获取过程及错误信息
- 提升代理获取的准确性和可追溯性
This commit is contained in:
danial
2025-12-10 18:16:59 +08:00
parent 5e1710efb4
commit 926cc3879f

View File

@@ -109,7 +109,7 @@ func (s *SendCardTaskTypeFlyFishV2) HandleSendCardTask(ctx context.Context, orde
SetHeader("origin", "https://ccfy.cardpay.fyi").
SetHeader("user-agent", useragent.GetUserAgentByPlatform(useragent.PlatformPhone)).
SetTimeout(time.Second * 30).OnBeforeRequest(func(client *resty.Client, request *resty.Request) error {
proxy, err2 := utils.GetProxy(ctx, utils.GenerateId(), "SendCardTaskTypeFlyFishV2_cardTask")
proxy, err2 := utils.GetProxy(ctx, task.LocalOrderID, "SendCardTaskTypeFlyFishV2_cardTask")
otelTrace.Logger.WithContext(ctx).Info("获取代理", zap.String("proxy", proxy))
if err2 != nil {
otelTrace.Logger.WithContext(ctx).Error("获取代理失败", zap.Error(err2))