diff --git a/YD_Event.Application/Event/UnifiedRegistrationService.cs b/YD_Event.Application/Event/UnifiedRegistrationService.cs index 2f09deb..f74eb5d 100644 --- a/YD_Event.Application/Event/UnifiedRegistrationService.cs +++ b/YD_Event.Application/Event/UnifiedRegistrationService.cs @@ -3354,11 +3354,21 @@ public class UnifiedRegistrationService : ITransient if (registration == null) throw Oops.Bah("报名记录不存在"); if (registration.PaymentStatus == 4) throw Oops.Bah("订单已取消"); - if (registration.PaymentMethod == 1 && registration.PaymentStatus != 0 && registration.PaymentStatus != 1) + + // 线下支付场景特殊处理 + if (registration.PaymentMethod == 1) { - throw Oops.Bah("线下支付订单仅当状态为未支付或已支付时允许取消,当前状态不允许取消"); + // 线下支付只有已支付/审核通过状态(PaymentStatus == 1)才允许退款 + if (registration.PaymentStatus != 1) + { + throw Oops.Bah("订单还在审核中,请联系管理员审核之后进行退款"); + } + } + else + { + // 线上支付场景保持原有逻辑 + if (registration.PaymentStatus != 1) throw Oops.Bah("未支付的订单无法退款"); } - if (registration.PaymentMethod != 1 && registration.PaymentStatus != 1) throw Oops.Bah("未支付的订单无法退款"); // 验证线下支付且已支付时,是否填写了收款人信息 if (registration.PaymentMethod == 1 && registration.PaymentStatus == 1)