From 81f516300ef6428cd09915985c68c65ef0f2f955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Fri, 15 May 2026 17:09:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=AB=E7=85=A7=E8=8E=B7=E5=8F=96=E9=80=80?= =?UTF-8?q?=E6=AC=BE=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Event/UnifiedRegistrationService.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/YD_Event.Application/Event/UnifiedRegistrationService.cs b/YD_Event.Application/Event/UnifiedRegistrationService.cs index ea9653c..5b7271f 100644 --- a/YD_Event.Application/Event/UnifiedRegistrationService.cs +++ b/YD_Event.Application/Event/UnifiedRegistrationService.cs @@ -2966,17 +2966,17 @@ public class UnifiedRegistrationService : ITransient output.ProjectDetails.Add(projectDetail); } - var refundConfigs = await _refundConfigService.GetList(); - refundConfigs = refundConfigs.Where(x => x.Status == Core.Enum.AvailabilityStatus.Enable).OrderBy(x => x.DayStart).ToList(); + // 从快照获取退款规则 + var refundSnapshots = await _ruleSnapshotService.GetRefundRuleSnapshot(eventInfo.Id); - foreach (var config in refundConfigs) + foreach (var snapshot in refundSnapshots) { output.RefundRules.Add(new RefundRuleDto { - DayStart = config.DayStart, - DayEnd = config.DayEnd, - DeductPercentage = config.DeductPercentage, - Remark = config.Remark + DayStart = snapshot.DayStart, + DayEnd = snapshot.DayEnd, + DeductPercentage = snapshot.DeductPercentage, + Remark = snapshot.Remark }); } @@ -2989,7 +2989,7 @@ public class UnifiedRegistrationService : ITransient } else { - var matchConfig = refundConfigs.FirstOrDefault(c => + var matchConfig = refundSnapshots.FirstOrDefault(c => daysRemaining >= c.DayStart && (c.DayEnd == int.MaxValue ? true : daysRemaining < c.DayEnd) );