@@ -53,7 +53,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public string PermissionStr { get; set; } = string.Empty;
|
||||
public int Order { get; set; }
|
||||
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
public List<Guid> UserTypeGroupIdList { get; set; } = new List<Guid>();
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
|
||||
var userTypeRoleQueryable = _userTypeRepository
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.IsEnable == true)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(userTypeQuery.SearchFilter), t => t.Description.Contains(userTypeQuery.SearchFilter!) || t.UserTypeName.Contains(userTypeQuery.SearchFilter!) || t.UserTypeShortName.Contains(userTypeQuery.SearchFilter!))
|
||||
|
||||
.WhereIf(userTypeQuery.GroupId != null, t => t.UserTypeGroupList.Any(t => t.DictionaryId == userTypeQuery.GroupId))
|
||||
@@ -158,7 +159,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public async Task<List<TrialUserType>> GetTrialUserTypeList()
|
||||
{
|
||||
//排除其他组的用户
|
||||
var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
||||
var query = _userTypeRepository
|
||||
.WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.IsEnable == true)
|
||||
.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
||||
.Where(t => !t.UserTypeGroupList.Any(t => t.Group.Code == "3"))
|
||||
.OrderBy(t => t.UserTypeShortName).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user