refactor: 删除审核接口的 renewMonths 字段
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,11 +23,6 @@ public sealed record ReviewTenantCommand : IRequest
|
||||
/// </summary>
|
||||
public string? Reason { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 续费时长(月)(仅当 Approve=true 时有效)。
|
||||
/// </summary>
|
||||
public int? RenewMonths { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 经营模式(仅当 Approve=true 时有效)。
|
||||
/// </summary>
|
||||
|
||||
@@ -109,33 +109,23 @@ public sealed class ReviewTenantCommandHandler(
|
||||
tenant.OperatingMode = request.OperatingMode.Value;
|
||||
}
|
||||
|
||||
// 3. 更新订阅有效期(如果指定了续费时长)
|
||||
if (request.RenewMonths.HasValue && request.RenewMonths.Value > 0)
|
||||
{
|
||||
var now = DateTime.UtcNow;
|
||||
var effectiveFrom = tenant.EffectiveFrom ?? now;
|
||||
var effectiveTo = effectiveFrom.AddMonths(request.RenewMonths.Value);
|
||||
tenant.EffectiveFrom = effectiveFrom;
|
||||
tenant.EffectiveTo = effectiveTo;
|
||||
}
|
||||
|
||||
// 4. 更新认证资料状态
|
||||
// 3. 更新认证资料状态
|
||||
verification.Status = TenantVerificationStatus.Approved;
|
||||
verification.ReviewedAt = DateTime.UtcNow;
|
||||
verification.ReviewedBy = currentUserAccessor.UserId;
|
||||
verification.ReviewedByName = actorName;
|
||||
|
||||
// 5. 释放领取
|
||||
// 4. 释放领取
|
||||
claim.ReleasedAt = DateTime.UtcNow;
|
||||
|
||||
// 6. 添加审核日志
|
||||
// 5. 添加审核日志
|
||||
await tenantRepository.AddAuditLogAsync(new TenantAuditLog
|
||||
{
|
||||
Id = idGenerator.NextId(),
|
||||
TenantId = tenant.Id,
|
||||
Action = TenantAuditAction.Approved,
|
||||
Title = "审核通过",
|
||||
Description = $"审核人:{actorName},续费时长:{request.RenewMonths ?? 0}个月",
|
||||
Description = $"审核人:{actorName}",
|
||||
OperatorId = currentUserAccessor.UserId,
|
||||
OperatorName = actorName,
|
||||
PreviousStatus = TenantStatus.PendingReview,
|
||||
|
||||
Reference in New Issue
Block a user