Merge branch 'development' of https://git.dlhis.com/liguoyang/jinko.yikatong into development
This commit is contained in:
@@ -6,7 +6,6 @@ using Kurisu.AspNetCore.DataAccess.SqlSugar.Aop;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Org.BouncyCastle.Asn1.Ocsp;
|
||||
|
||||
namespace Dlhis.Canteen.Dishes.Controllers;
|
||||
|
||||
@@ -19,21 +18,12 @@ namespace Dlhis.Canteen.Dishes.Controllers;
|
||||
public class OrdersController : ControllerBase
|
||||
{
|
||||
private readonly IOrderService _orderService;
|
||||
private readonly IBookingOrderService _bookingOrderService;
|
||||
|
||||
public OrdersController(IOrderService orderService)
|
||||
public OrdersController(IOrderService orderService, IBookingOrderService bookingOrderService)
|
||||
{
|
||||
_orderService = orderService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 订单分页
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("page")]
|
||||
public async Task<Pagination<OrderResponse>> GetPageAsync([FromQuery] OrderPageRequest request)
|
||||
{
|
||||
return await _orderService.GetPageAsync(request);
|
||||
_bookingOrderService = bookingOrderService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -60,39 +50,6 @@ public class OrdersController : ControllerBase
|
||||
return await _orderService.AddAsync(request);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 订餐
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("booking")]
|
||||
[Transactional]
|
||||
public async Task Booking(BookingMealRequest request)
|
||||
{
|
||||
await _orderService.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>
|
||||
/// <returns></returns>
|
||||
[HttpPost("recharge")]
|
||||
public async Task ReCharge()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 订单聚合数据
|
||||
/// </summary>
|
||||
@@ -102,4 +59,28 @@ public class OrdersController : ControllerBase
|
||||
{
|
||||
return await _orderService.GetOrdersAggregationAsync(page);
|
||||
}
|
||||
|
||||
//************************************************************** 订餐功能 **********************************************************************************
|
||||
|
||||
/// <summary>
|
||||
/// 订餐
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("booking")]
|
||||
[Transactional]
|
||||
public async Task Booking(BookingMealRequest request)
|
||||
{
|
||||
await _bookingOrderService.BookingAsync(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 订单分页
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("booking/page")]
|
||||
public async Task<Pagination<OrderBookingResponse>> GetBookingPageAsync([FromQuery] OrderBookingPageRequest request)
|
||||
{
|
||||
return await _bookingOrderService.GetBookingPageAsync(request);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user