Browse Source

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

tangjiang 4 months ago
parent
commit
c32f3ad300
1 changed files with 7 additions and 5 deletions
  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>