fix: 排队激活未评估停复机、孤儿套餐重复激活与微信查单订单不存在反复重查
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m26s

- 排队激活与首次实名激活任务的处理器注入停复机服务:原来传 nil,激活后不重新评估停复机,付款或实名后要等下一轮轮询才复机(生产同样存在)
- 孤儿套餐扫描跳过载体未实名的"实名即生效"套餐:激活服务会直接跳过,原来每 10 秒重复提交一次激活任务
- 微信 v2 查单返回 ORDERNOTEXIST 时按"渠道无此订单"处理:代理充值支付单过期后关闭,不再当作结果未知每几分钟重查

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
邹进
2026-10-27 11:07:17 +09:00
parent c9e5d65590
commit d2b0d2f534
6 changed files with 47 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ package payment
import (
"context"
stderrors "errors"
"strconv"
"time"
@@ -66,6 +67,16 @@ func (a *WechatWebAdapter) Query(ctx context.Context, request agentrecharge.Onli
}
startedAt := time.Now()
info, callErr := a.queryOrder(ctx, request.Config, request.PaymentNo)
if stderrors.Is(callErr, wechatpay.ErrOrderNotExist) {
if _, err = a.integration.Complete(ctx, attempt.IntegrationID, integrationlog.Completion{
Result: constants.IntegrationResultSuccess, ProviderCode: "ORDERNOTEXIST",
ResponseSummary: map[string]any{"state": agentrecharge.OnlinePaymentStateNotFound},
DurationMS: time.Since(startedAt).Milliseconds(),
}); err != nil {
return agentrecharge.OnlinePaymentQueryResult{}, err
}
return agentrecharge.OnlinePaymentQueryResult{State: agentrecharge.OnlinePaymentStateNotFound}, nil
}
if callErr != nil {
return agentrecharge.OnlinePaymentQueryResult{}, a.completeUnknown(ctx, attempt.IntegrationID, startedAt, callErr)
}