fix:修复注释错误
This commit is contained in:
@@ -30,13 +30,13 @@ public sealed class RestoreIdentityUserCommandHandler(
|
||||
var operatorProfile = await adminAuthService.GetProfileAsync(currentUserAccessor.UserId, cancellationToken);
|
||||
var isSuperAdmin = IdentityUserAccess.IsSuperAdmin(operatorProfile);
|
||||
|
||||
// 2. (空行后) 校验跨租户访问权限
|
||||
// 2. 校验跨租户访问权限
|
||||
if (!isSuperAdmin && request.TenantId.HasValue && request.TenantId.Value != currentTenantId)
|
||||
{
|
||||
throw new BusinessException(ErrorCodes.Forbidden, "禁止跨租户恢复用户");
|
||||
}
|
||||
|
||||
// 3. (空行后) 查询用户实体(包含已删除)
|
||||
// 3. 查询用户实体(包含已删除)
|
||||
var user = await identityUserRepository.GetForUpdateIncludingDeletedAsync(currentTenantId, request.UserId, isSuperAdmin, cancellationToken);
|
||||
if (user == null)
|
||||
{
|
||||
@@ -53,7 +53,7 @@ public sealed class RestoreIdentityUserCommandHandler(
|
||||
return false;
|
||||
}
|
||||
|
||||
// 4. (空行后) 构建操作日志消息
|
||||
// 4. 构建操作日志消息
|
||||
var operatorName = string.IsNullOrWhiteSpace(operatorProfile.DisplayName)
|
||||
? operatorProfile.Account
|
||||
: operatorProfile.DisplayName;
|
||||
@@ -74,7 +74,7 @@ public sealed class RestoreIdentityUserCommandHandler(
|
||||
Success = true
|
||||
};
|
||||
|
||||
// 5. (空行后) 恢复软删除状态并写入 Outbox
|
||||
// 5. 恢复软删除状态并写入 Outbox
|
||||
user.DeletedAt = null;
|
||||
user.DeletedBy = null;
|
||||
await operationLogPublisher.PublishAsync(logMessage, cancellationToken);
|
||||
|
||||
Reference in New Issue
Block a user