This commit is contained in:
2026-04-29 11:38:59 +08:00
parent e96e3f9583
commit 7d363f4e8a
30 changed files with 1135 additions and 215 deletions

View File

@@ -10,7 +10,6 @@ import (
"path"
"regexp"
"strings"
paylogic "bdrp-server/app/main/api/internal/logic/pay"
"bdrp-server/app/main/api/internal/service"
"bdrp-server/app/main/api/internal/svc"
"bdrp-server/app/main/api/internal/types"
@@ -283,8 +282,8 @@ func (l *PaySuccessNotifyUserHandler) handleError(ctx context.Context, err error
return fmt.Errorf("更新订单状态失败: %v", updateOrderErr)
}
// 使用公共函数按本次退款金额处理佣金和钱包扣除
_ = paylogic.HandleCommissionAndWalletDeduction(ctx, l.svcCtx, nil, order, order.Amount)
// 使用 AgentService 中的共用退款扣款逻辑
l.svcCtx.AgentService.HandleOrderRefundDeduction(ctx, nil, order, order.Amount)
return asynq.SkipRetry
} else {