using Dlhis.Canteen.Order.Request; using Dlhis.Canteen.Order.Response; using Dlhis.Canteen.Order.Services; using Kurisu.Core.DataAccess.Dto; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; namespace Dlhis.Canteen.Order.Controllers; /// /// 订单 /// [Authorize] [Route("api/[controller]")] [ApiController] public class OrdersController : ControllerBase { private readonly IOrderService _orderService; public OrdersController(IOrderService orderService) { _orderService = orderService; } /// /// 订单分页 /// /// /// [HttpGet("page")] public async Task> GetPageAsync([FromQuery] OrderPageRequest request) { return await _orderService.GetPageAsync(request); } /// /// 添加充值消费订单 /// /// /// [AllowAnonymous] [HttpPost] public async Task AddAsync(OrderAddRequest request) { await _orderService.AddAsync(request); } }