修改用户列表选择

Test_IRC_Net8
hang 2025-09-29 10:30:09 +08:00
parent 406235cc03
commit 87955d2ca0
3 changed files with 9 additions and 1 deletions

View File

@ -317,6 +317,8 @@ namespace IRaCIS.Application.Contracts
public UserCeateSource? UserCeateSource { get; set; }
public Guid? AuditRecordId { get; set; }
public bool? IsAuditRecordUserSelect { get; set; }
}
public class UserRoleInfoDTO

View File

@ -511,11 +511,13 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inQuery.BeginLastChangePassWordTime != null, t => t.LastChangePassWordTime >= inQuery.BeginLastChangePassWordTime)
.WhereIf(inQuery.EndLastChangePassWordTime != null, t => t.LastChangePassWordTime <= inQuery.EndLastChangePassWordTime)
.WhereIf(inQuery.UserType != null, t => t.UserRoleList.Any(t => t.UserTypeId == inQuery.UserType && t.IsUserRoleDisabled == false))
.WhereIf(inQuery.UserTypeEnum != null, t => t.UserRoleList.Any(t => t.UserTypeRole.UserTypeEnum == inQuery.UserTypeEnum && t.IsUserRoleDisabled == false))
.WhereIf(inQuery.UserTypeEnum != null, t => t.UserRoleList.Any(t => t.UserTypeRole.UserTypeEnum == inQuery.UserTypeEnum && t.IsUserRoleDisabled == false))
.WhereIf(inQuery.UserState != null, t => t.Status == inQuery.UserState)
.WhereIf(inQuery.IsTestUser != null, t => t.IsTestUser == inQuery.IsTestUser)
.WhereIf(inQuery.IsZhiZhun != null, t => t.IsZhiZhun == inQuery.IsZhiZhun)
.WhereIf(inQuery.UserCeateSource != null, t => t.UserCeateSource == inQuery.UserCeateSource)
.WhereIf(inQuery.AuditRecordId != null && inQuery.IsAuditRecordUserSelect == true, t => t.AuditRecordList.Any(t => t.AuditRecordId == inQuery.AuditRecordId))
.WhereIf(inQuery.AuditRecordId != null && inQuery.IsAuditRecordUserSelect == false, t => !t.AuditRecordList.Any(t => t.AuditRecordId == inQuery.AuditRecordId))
.ProjectTo<UserListDTO>(_mapper.ConfigurationProvider);
var pageList = await userQueryable.ToPagedListAsync(inQuery);

View File

@ -69,6 +69,10 @@ public class IdentityUser : BaseFullAuditEntity
[JsonIgnore]
public List<TrialIdentityUser> UserTrialList { get; set; }
[JsonIgnore]
public List<AuditRecordIdentityUser> AuditRecordList { get; set; }
[JsonIgnore]
public List<UserRole> UserRoleList { get; set; } = new List<UserRole>();