查询验证

This commit is contained in:
he
2024-01-10 10:48:21 +08:00
parent 397ac4a154
commit 4c607302f3
13 changed files with 112 additions and 45 deletions
@@ -144,7 +144,11 @@ namespace IRaCIS.Core.Application.Contracts
public Guid? UserTypeId { get; set; }
public Guid? UserId { get; set; }
}
public bool? IsConfirmed { get; set; }
public bool? IsDeleted { get; set; }
}
///<summary> SystemDocumentAddOrEdit 列表查询参数模型</summary>
public class SystemDocumentAddOrEdit
@@ -409,7 +409,9 @@ namespace IRaCIS.Core.Application.Services
var unionQuery = trialDocQuery.Union(systemDocQuery)
.WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId)
.WhereIf(querySystemDocument.UserTypeId != null, t => t.UserTypeId == querySystemDocument.UserTypeId);
.WhereIf(querySystemDocument.IsConfirmed != null, t => t.IsConfirmed == querySystemDocument.IsConfirmed)
.WhereIf(querySystemDocument.IsDeleted != null, t => t.IsDeleted == querySystemDocument.IsDeleted)
.WhereIf(querySystemDocument.UserTypeId != null, t => t.UserTypeId == querySystemDocument.UserTypeId);
var result = await unionQuery.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);