feat 订单聚合接口

This commit is contained in:
2024-03-19 20:53:16 +08:00
parent 14383741af
commit 1448ed8eb5
2 changed files with 24 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ using Kurisu.AspNetCore.DataAccess.SqlSugar.Aop;
using Kurisu.Core.DataAccess.Dto; using Kurisu.Core.DataAccess.Dto;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Org.BouncyCastle.Asn1.Ocsp;
namespace Dlhis.Canteen.Dishes.Controllers; namespace Dlhis.Canteen.Dishes.Controllers;
@@ -103,6 +104,17 @@ public class OrdersController : ControllerBase
return await _bookingOrderService.BookingAsync(request); return await _bookingOrderService.BookingAsync(request);
} }
///// <summary>
///// 获取详情
///// </summary>
///// <param name="no"></param>
///// <returns></returns>
//[HttpGet("details")]
//public async Task<List<OrderDetailResponse>> GetDetailsAsync(string no)
//{
// return await _orderService.GetDetailsAsync(no);
//}
/// <summary> /// <summary>
/// 订单分页 /// 订单分页
/// </summary> /// </summary>
@@ -113,4 +125,14 @@ public class OrdersController : ControllerBase
{ {
return await _bookingOrderService.GetBookingPageAsync(request); return await _bookingOrderService.GetBookingPageAsync(request);
} }
/// <summary>
/// 订单聚合数据
/// </summary>
/// <returns></returns>
[HttpGet("aggregation")]
public async Task<Pagination<OrderAggregationResponse>> GetOrdersAggregationAsync([FromQuery] PageDto page)
{
return await _orderService.GetOrdersAggregationAsync(page);
}
} }

View File

@@ -18,6 +18,8 @@ using SqlSugar;
using Dlhis.Canteen.Order.Response; using Dlhis.Canteen.Order.Response;
using Dlhis.Canteen.Dishes; using Dlhis.Canteen.Dishes;
using Dlhis.Canteen.Order.Request; using Dlhis.Canteen.Order.Request;
using System.Numerics;
using MySqlX.XDevAPI.Relational;
namespace Dlhis.Canteen.Order.Services.Implements; namespace Dlhis.Canteen.Order.Services.Implements;