fadd
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
paylogic "tyc-server/app/main/api/internal/logic/pay"
|
||||
"tyc-server/app/main/api/internal/service"
|
||||
"tyc-server/app/main/api/internal/svc"
|
||||
"tyc-server/app/main/api/internal/types"
|
||||
"tyc-server/app/main/model"
|
||||
@@ -142,10 +143,19 @@ func (l *PaySuccessNotifyUserHandler) ProcessTask(ctx context.Context, t *asynq.
|
||||
}
|
||||
}
|
||||
|
||||
// 调用API请求服务
|
||||
responseData, err := l.svcCtx.ApiRequestService.ProcessRequests(decryptData, product.Id)
|
||||
if err != nil {
|
||||
return l.handleError(ctx, err, order, query)
|
||||
// 调用API请求服务(开发环境下不调用其它产品,使用默认空报告;测试支付 order.PaymentPlatform=="test" 也走空报告)
|
||||
var responseData []service.APIResponseData
|
||||
isEmptyReportMode := env == "development" || order.PaymentPlatform == "test"
|
||||
if isEmptyReportMode {
|
||||
// 开发环境 / 测试支付:生成仅包含基本信息的默认空报告,不调用外部 API
|
||||
logx.Infof("空报告模式:订单 %s (ID: %d) 跳过API调用,生成空报告", order.OrderNo, order.Id)
|
||||
responseData = []service.APIResponseData{}
|
||||
} else {
|
||||
var processErr error
|
||||
responseData, processErr = l.svcCtx.ApiRequestService.ProcessRequests(decryptData, product.Id)
|
||||
if processErr != nil {
|
||||
return l.handleError(ctx, processErr, order, query)
|
||||
}
|
||||
}
|
||||
|
||||
// 计算成功模块的总成本价
|
||||
|
||||
Reference in New Issue
Block a user