改为分页

Uat_Study
hang 2022-05-20 18:14:24 +08:00
parent 4b46006ed0
commit 147aad674c
3 changed files with 4 additions and 4 deletions

View File

@ -25,7 +25,7 @@ namespace IRaCIS.Core.Application.Service
}
[HttpPost]
public async Task<List<CommonDocumentView>> GetCommonDocumentList(CommonDocumentQuery queryCommonDocument)
public async Task<PageOutput<CommonDocumentView>> GetCommonDocumentList(CommonDocumentQuery queryCommonDocument)
{
var commonDocumentQueryable = _commonDocumentRepository.AsQueryable(true)
@ -35,7 +35,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(string.IsNullOrEmpty(queryCommonDocument.Name), t => t.Name.Contains(queryCommonDocument.Name))
.ProjectTo<CommonDocumentView>(_mapper.ConfigurationProvider,new { token = _userInfo.UserToken, userId = _userInfo.Id });
return await commonDocumentQueryable.ToListAsync();
return await commonDocumentQueryable.ToPagedListAsync(queryCommonDocument.PageIndex, queryCommonDocument.PageSize, String.IsNullOrEmpty(queryCommonDocument.SortField) ? nameof(CommonDocument.Code) : queryCommonDocument.SortField, queryCommonDocument.Asc); ;
}

View File

@ -25,7 +25,7 @@ namespace IRaCIS.Core.Application.ViewModel
}
///<summary>CommonDocumentQuery 列表查询参数模型</summary>
public class CommonDocumentQuery
public class CommonDocumentQuery:PageInput
{
public Guid? FileTypeId { get; set; }
public Guid? ModuleTypeId { get; set; }

View File

@ -14,7 +14,7 @@ namespace IRaCIS.Core.Application.Interfaces
{
Task<List<CommonDocumentView>> GetCommonDocumentList(CommonDocumentQuery queryCommonDocument);
Task<PageOutput<CommonDocumentView>> GetCommonDocumentList(CommonDocumentQuery queryCommonDocument);
Task<IResponseOutput> AddOrUpdateCommonDocument(CommonDocumentAddOrEdit addOrEditCommonDocument);