fix:修复注释错误
This commit is contained in:
@@ -120,7 +120,7 @@ public sealed class ProcessAutoRenewalCommandHandler(
|
||||
// 1. 以年月差作为周期(月),兼容“按月续费”模型
|
||||
var months = (effectiveTo.Year - effectiveFrom.Year) * 12 + effectiveTo.Month - effectiveFrom.Month;
|
||||
|
||||
// 2. (空行后) 对不足 1 个月的情况兜底为 1
|
||||
// 2. 对不足 1 个月的情况兜底为 1
|
||||
return months <= 0 ? 1 : months;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ public sealed class ProcessAutoRenewalCommandHandler(
|
||||
return monthlyPrice * durationMonths;
|
||||
}
|
||||
|
||||
// 2. (空行后) 按年 + 月组合计算金额
|
||||
// 2. 按年 + 月组合计算金额
|
||||
var years = durationMonths / 12;
|
||||
var remainingMonths = durationMonths % 12;
|
||||
return yearlyPrice.Value * years + monthlyPrice * remainingMonths;
|
||||
|
||||
@@ -40,14 +40,14 @@ public sealed class ProcessSubscriptionExpiryCommandHandler(
|
||||
await subscriptionRepository.UpdateAsync(subscription, cancellationToken);
|
||||
}
|
||||
|
||||
// 3. (空行后) 宽限期到期自动暂停
|
||||
// 3. 宽限期到期自动暂停
|
||||
foreach (var subscription in gracePeriodExpired)
|
||||
{
|
||||
subscription.Status = SubscriptionStatus.Suspended;
|
||||
await subscriptionRepository.UpdateAsync(subscription, cancellationToken);
|
||||
}
|
||||
|
||||
// 4. (空行后) 保存变更
|
||||
// 4. 保存变更
|
||||
var totalChanged = expiredActive.Count + gracePeriodExpired.Count;
|
||||
if (totalChanged > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user