Parcourir la source

发布列表和发布待办根据前端传入的pageSize查询条数

qinchaoyue il y a 5 mois
Parent
commit
5dd2e2220e
1 fichiers modifiés avec 2 ajouts et 4 suppressions
  1. 2 4
      src/Hotline.Api/Controllers/OrderController.cs

+ 2 - 4
src/Hotline.Api/Controllers/OrderController.cs

@@ -288,9 +288,8 @@ public class OrderController : BaseController
     [HttpGet("publish/items")]
     public async Task<IList<PublishDto>> GetPublishOrderListAsync([FromQuery] QueryOrderPublishDto dto)
     { 
-        var fixedQueryCount = _systemSettingCacheManager.FixedQueryCount;
         var query = _orderApplication.GetPublishOrderList(dto);
-        return (await query.ToFixedListAsync(dto.QueryIndex, fixedQueryCount, HttpContext.RequestAborted))
+        return (await query.ToFixedListAsync(dto.QueryIndex, dto.PageSize, HttpContext.RequestAborted))
             .Adapt<List<PublishDto>>();
     }
 
@@ -664,9 +663,8 @@ public class OrderController : BaseController
     [HttpGet("published/items")]
     public async Task<IList<PublishedDto>> GetPublishedOrderListAsync([FromQuery] PublishedPagedRequest dto)
     {
-        var fixedQueryCount = _systemSettingCacheManager.FixedQueryCount;
         var query = _orderApplication.GetPublishedOrder(dto);
-        return (await query.ToFixedListAsync(dto.QueryIndex, fixedQueryCount, HttpContext.RequestAborted))
+        return (await query.ToFixedListAsync(dto.QueryIndex, dto.PageSize, HttpContext.RequestAborted))
             .Adapt<List<PublishedDto>>();
     }