From 147aad674c66b1dff640f40d4478cbd440306e07 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 20 May 2022 18:14:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Common/CommonDocumentService.cs | 4 ++-- .../Service/Common/DTO/CommonDocumentViewModel.cs | 2 +- .../Service/Common/Interface/ICommonDocumentService.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs index a0bb8e1c9..5727c19f3 100644 --- a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs @@ -25,7 +25,7 @@ namespace IRaCIS.Core.Application.Service } [HttpPost] - public async Task> GetCommonDocumentList(CommonDocumentQuery queryCommonDocument) + public async Task> 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(_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); ; } diff --git a/IRaCIS.Core.Application/Service/Common/DTO/CommonDocumentViewModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/CommonDocumentViewModel.cs index 37d4bc67b..9410059ab 100644 --- a/IRaCIS.Core.Application/Service/Common/DTO/CommonDocumentViewModel.cs +++ b/IRaCIS.Core.Application/Service/Common/DTO/CommonDocumentViewModel.cs @@ -25,7 +25,7 @@ namespace IRaCIS.Core.Application.ViewModel } ///CommonDocumentQuery 列表查询参数模型 - public class CommonDocumentQuery + public class CommonDocumentQuery:PageInput { public Guid? FileTypeId { get; set; } public Guid? ModuleTypeId { get; set; } diff --git a/IRaCIS.Core.Application/Service/Common/Interface/ICommonDocumentService.cs b/IRaCIS.Core.Application/Service/Common/Interface/ICommonDocumentService.cs index 94d984bcb..ef38e62c5 100644 --- a/IRaCIS.Core.Application/Service/Common/Interface/ICommonDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Common/Interface/ICommonDocumentService.cs @@ -14,7 +14,7 @@ namespace IRaCIS.Core.Application.Interfaces { - Task> GetCommonDocumentList(CommonDocumentQuery queryCommonDocument); + Task> GetCommonDocumentList(CommonDocumentQuery queryCommonDocument); Task AddOrUpdateCommonDocument(CommonDocumentAddOrEdit addOrEditCommonDocument);