fix:修复注释错误
This commit is contained in:
@@ -24,7 +24,7 @@ public sealed class UpdateBillingStatusCommandHandler(
|
||||
throw new BusinessException(ErrorCodes.NotFound, "账单不存在");
|
||||
}
|
||||
|
||||
// 2. (空行后) 状态转换规则校验
|
||||
// 2. 状态转换规则校验
|
||||
if (billing.Status == TenantBillingStatus.Paid && request.NewStatus != TenantBillingStatus.Paid)
|
||||
{
|
||||
throw new BusinessException(ErrorCodes.BusinessError, "已支付账单不允许改为其他状态");
|
||||
@@ -35,7 +35,7 @@ public sealed class UpdateBillingStatusCommandHandler(
|
||||
throw new BusinessException(ErrorCodes.BusinessError, "已取消账单不允许变更状态");
|
||||
}
|
||||
|
||||
// 3. (空行后) 更新状态与备注
|
||||
// 3. 更新状态与备注
|
||||
billing.Status = request.NewStatus;
|
||||
if (!string.IsNullOrWhiteSpace(request.Notes))
|
||||
{
|
||||
@@ -44,7 +44,7 @@ public sealed class UpdateBillingStatusCommandHandler(
|
||||
: $"{billing.Notes}\n[状态变更] {request.Notes}";
|
||||
}
|
||||
|
||||
// 4. (空行后) 持久化
|
||||
// 4. 持久化
|
||||
await billingRepository.UpdateAsync(billing, cancellationToken);
|
||||
await billingRepository.SaveChangesAsync(cancellationToken);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user