快照获取退款规则
This commit is contained in:
parent
5bb4bd2d00
commit
81f516300e
@ -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)
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user