From 046ad55b57605db2b20e0d06f8ade981209bb738 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 26 Aug 2025 15:28:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Management/DTO/UserLogViewModel.cs | 8 ++++++++ .../Service/Management/UserService.cs | 12 +++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs index 9357f9f8c..7f6742ce3 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserLogViewModel.cs @@ -75,6 +75,14 @@ namespace IRaCIS.Core.Application.ViewModel } + public class SetIsIgnoreUncommonlyInDto + { + public Guid Id { get; set; } + + public bool IsIgnoreUncommonly { get; set; } + } + + ///UserLogQuery 列表查询参数模型 public class UserLogQuery : PageInput { diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index f6bce8623..bc1aeca08 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -919,7 +919,17 @@ namespace IRaCIS.Core.Application.Service } - + /// + /// 设置是否忽略异地登录 + /// + /// + /// + [HttpPost] + public async Task SetIsIgnoreUncommonly(SetIsIgnoreUncommonlyInDto inDto) + { + await _userLogRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new UserLog() { IsIgnoreUncommonly = inDto.IsIgnoreUncommonly }, true); + return ResponseOutput.Ok(); + }