From 2691da82aec20652dee3b68b179ff14bfc80537b Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 31 Dec 2024 10:19:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=85=E9=83=A8=E4=BA=BA?= =?UTF-8?q?=E5=91=98=20=E6=9F=A5=E8=AF=A2=E5=88=97=E8=A1=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TrialSiteUser/DTO/UserTrialViewModel.cs | 2 ++ .../Service/TrialSiteUser/TrialMaintenanceService.cs | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs index e1f5423e5..aca922846 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs @@ -483,6 +483,8 @@ namespace IRaCIS.Application.Contracts public string OrganizationName { get; set; } = String.Empty; public UserTypeEnum? UserTypeEnum { get; set; } + + public bool? IsUserRoleDisabled { get; set; } } public class TrialUserScreeningDTO : TrialUserAddCommand diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs index 19452604d..185c13a10 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs @@ -6,6 +6,7 @@ using IRaCIS.Core.Application.Filter; using IRaCIS.Core.Domain.Share; using MassTransit.Serialization; using Microsoft.AspNetCore.Mvc; +using System; namespace IRaCIS.Core.Application.Service { @@ -62,7 +63,7 @@ namespace IRaCIS.Core.Application.Service UserTypeShortName = ur.UserRole.UserTypeRole.UserTypeShortName, IsDeleted = ur.IsDeleted, CreateTime = ur.CreateTime, - UserTypeEnum=ur.UserRole.UserTypeEnum, + UserTypeEnum = ur.UserRole.UserTypeEnum, UpdateTime = ur.UpdateTime }).ToList() }); @@ -143,6 +144,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserRealName), t => t.IdentityUser.FullName.Contains(inQuery.UserRealName)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserName), t => t.IdentityUser.UserName.Contains(inQuery.UserName)) .WhereIf(!string.IsNullOrWhiteSpace(inQuery.OrganizationName), t => t.IdentityUser.OrganizationName.Contains(inQuery.OrganizationName)) + .WhereIf(inQuery.IsUserRoleDisabled != null, t => t.IsUserRoleDisabled == inQuery.IsUserRoleDisabled) .Select(t => new TrialUserRoleScreeningDto() { Id = t.Id, @@ -158,7 +160,7 @@ namespace IRaCIS.Core.Application.Service }); - return await query.ToPagedListAsync(inQuery,nameof(TrialUserRoleScreeningDto.EMail)); + return await query.ToPagedListAsync(inQuery, nameof(TrialUserRoleScreeningDto.EMail)); }