From 812035686ed00a4254f0a40fa68fc76547e3da5a Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 25 Feb 2025 09:57:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7=E5=8F=82?= =?UTF-8?q?=E4=B8=8E=E9=A1=B9=E7=9B=AE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Management/DTO/UserTypeRoleModel.cs | 1 + .../Service/TrialSiteUser/DTO/UserTrialViewModel.cs | 5 +++++ .../Service/TrialSiteUser/TrialMaintenanceService.cs | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserTypeRoleModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserTypeRoleModel.cs index 2b448a868..2a37c712e 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserTypeRoleModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserTypeRoleModel.cs @@ -95,6 +95,7 @@ namespace IRaCIS.Core.Application.Contracts public class UserTypeSelectDto { + public bool IsDeleted { get; set; } public Guid UserTypeId { get; set; } public string UserTypeShortName { get; set; } = string.Empty; } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs index 6a8657487..68fba3f4a 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs @@ -139,6 +139,11 @@ namespace IRaCIS.Application.Contracts public DateTime? JoinTime { get; set; } + + public string Roles => string.Join(',', TrialUserRoleList.Select(t => t.UserTypeShortName)); + public string JoinTimeStr => JoinTime?.ToString("yyyy-MM-dd") ?? string.Empty; + public string RemoveTimeStr => RemoveTime?.ToString("yyyy-MM-dd") ?? string.Empty; + } public class TrialMaintenanceDTO : UserTrialCommand diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs index 4bc8f2624..bdcd78907 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs @@ -50,7 +50,7 @@ namespace IRaCIS.Core.Application.Service IsDeleted = t.IsDeleted, JoinTime = t.JoinTime, RemoveTime = t.RemoveTime, - TrialUserRoleList = t.TrialUserRoleList.Select(t => new UserTypeSelectDto() { UserTypeId = t.UserRole.UserTypeRole.Id, UserTypeShortName = t.UserRole.UserTypeRole.UserTypeShortName }).ToList(), + TrialUserRoleList = t.TrialUserRoleList.Select(t => new UserTypeSelectDto() { IsDeleted = t.IsDeleted, UserTypeId = t.UserRole.UserTypeRole.Id, UserTypeShortName = t.UserRole.UserTypeRole.UserTypeShortName }).ToList(), }).ToPagedListAsync(inQuery);