瀏覽代碼

Merge branch 'test' of http://110.188.24.182:10023/Fengwo/hotline into test

tangjiang 4 月之前
父節點
當前提交
c32f3ad300
共有 1 個文件被更改,包括 7 次插入5 次删除
  1. 7 5
      src/Hotline.Api/Controllers/OrderController.cs

+ 7 - 5
src/Hotline.Api/Controllers/OrderController.cs

@@ -3097,12 +3097,14 @@ public class OrderController : BaseController
     /// <param name="dto"></param>
     /// <returns></returns>
     [HttpGet]
-    public async Task<PagedDto<OrderDto>> Query([FromQuery] QueryOrderDto dto)
+    public async Task<IReadOnlyList<OrderDto>> Query([FromQuery] QueryOrderDto dto)
     {
-        var query = _orderApplication.QueryOrders(dto);
-        var (total, items) = await query.ToPagedListAsync(dto, HttpContext.RequestAborted);
-
-        return new PagedDto<OrderDto>(total, _mapper.Map<IReadOnlyList<OrderDto>>(items));
+        //var query = _orderApplication.QueryOrders(dto);
+        //var (total, items) = await query.ToPagedListAsync(dto, HttpContext.RequestAborted);
+        //return new PagedDto<OrderDto>(total, _mapper.Map<IReadOnlyList<OrderDto>>(items));
+        var orders = await _orderApplication.QueryOrders(dto)
+            .ToPageListWithoutTotalAsync(dto, HttpContext.RequestAborted);
+        return _mapper.Map<IReadOnlyList<OrderDto>>(orders);
     }
 
     /// <summary>