From aff2f3d831048bebc9384087170d067f0f51b7d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Tue, 12 May 2026 15:44:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E4=B8=8B=E6=94=AF=E4=BB=98=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E8=AE=A2=E5=8D=95=E5=AE=A1=E6=89=B9=E5=90=8E=E6=89=8D?= =?UTF-8?q?=E8=83=BD=E9=80=80=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Event/UnifiedRegistrationService.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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)