fix:修复注释错误

This commit is contained in:
2026-01-04 21:22:26 +08:00
parent a427b0f22a
commit 398c716734
69 changed files with 353 additions and 318 deletions

View File

@@ -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;

View File

@@ -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)
{