fix
This commit is contained in:
@@ -240,6 +240,15 @@ func (l *PaySuccessNotifyUserHandler) handleError(ctx context.Context, err error
|
||||
logx.Errorf("更新订单状态失败,订单ID: %s, 错误: %v", order.Id, updateOrderErr)
|
||||
return fmt.Errorf("更新订单状态失败: %v", updateOrderErr)
|
||||
}
|
||||
// 检查并处理代理订单(虽然查询失败时代理订单通常未处理,但为了完整性)
|
||||
agentOrder, err := l.svcCtx.AgentOrderModel.FindOneByOrderId(ctx, order.Id)
|
||||
if err == nil && agentOrder != nil && agentOrder.ProcessStatus == 1 {
|
||||
if cancelErr := l.svcCtx.AgentService.CancelAgentCommission(ctx, order.Id); cancelErr != nil {
|
||||
logx.Errorf("撤销代理收益失败,订单ID: %s, 错误: %v", order.Id, cancelErr)
|
||||
} else {
|
||||
logx.Infof("成功撤销代理收益,订单ID: %s", order.Id)
|
||||
}
|
||||
}
|
||||
return asynq.SkipRetry
|
||||
} else {
|
||||
logx.Errorf("支付宝退款失败:%v", refundErr)
|
||||
|
||||
Reference in New Issue
Block a user