From 89cd31cd03526561bea11576109a86a15313a5a0 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 24 Dec 2024 17:06:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Management/DTO/UserModel.cs | 21 ++++++++++++------- .../Service/Management/_MapConfig.cs | 6 ++++++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs index 42faa9c52..ff69fe5d5 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs @@ -218,9 +218,18 @@ namespace IRaCIS.Application.Contracts } - public class UserAddUserType + public class IdentityUserTypeDTO: UserAddUserType { public Guid Id { get; set; } + public string UserTypeShortName { get; set; } + + public DateTime CreateTime { get; set; } + + public DateTime UpdateTime { get; set; } + } + + public class UserAddUserType + { public UserTypeEnum UserTypeEnum { get; set; } @@ -228,9 +237,7 @@ namespace IRaCIS.Application.Contracts public bool IsUserRoleDisabled { get; set; } - public DateTime CreateTime { get; set; } - - public DateTime UpdateTime { get; set; } + } public class EditPasswordCommand @@ -286,17 +293,15 @@ namespace IRaCIS.Application.Contracts public class UserListDTO : UserInfo { - //public bool CanEditUserType { get; set; } public DateTime CreateTime { get; set; } - public Guid IdentityUserId { get; set; } + public Guid Id { get; set; } public string FullName { get; set; } - - public List UserRoleList { get; set; } + public List UserRoleList { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs index 64110b524..9ec293b9a 100644 --- a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs @@ -154,6 +154,12 @@ namespace IRaCIS.Core.Application.Service CreateMap(); CreateMap(); + + + CreateMap() + .ForMember(d => d.UserTypeShortName, c => c.MapFrom(t => t.UserTypeRole.UserTypeShortName)); + + } }