From 1af2c29729baced926d4c8d0c93fd6a87f6f36b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Sat, 9 May 2026 17:26:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E6=94=AF=E4=BB=98=E4=B8=8D=E7=AE=97?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YD_Event.Application/Event/UnifiedRegistrationService.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/YD_Event.Application/Event/UnifiedRegistrationService.cs b/YD_Event.Application/Event/UnifiedRegistrationService.cs index 27251b9..2c853eb 100644 --- a/YD_Event.Application/Event/UnifiedRegistrationService.cs +++ b/YD_Event.Application/Event/UnifiedRegistrationService.cs @@ -2339,6 +2339,15 @@ public class UnifiedRegistrationService : ITransient _logger.LogInformation("开始取消报名:报名ID={RegistrationId}, 操作人={UserId}, 当前状态={PaymentStatus}", registrationId, operatorUserId, reg.PaymentStatus); + // 如果是预报名记录(状态5),直接删除 + if (reg.PaymentStatus == 5) + { + await DeleteRegistrationAsync(reg); + _logger.LogInformation("已删除预报名记录:报名ID={RegistrationId}", registrationId); + return true; + } + + // 其他状态的记录,更新状态为已取消 reg.PaymentStatus = 4; reg.UpdatedTime = DateTime.Now; reg.UpdatedUserId = operatorUserId;