35 lines
872 B
C#
35 lines
872 B
C#
using Dlhis.Middle.Request;
|
|
using Dlhis.Middle.Response;
|
|
using Dlhis.Middle.Services;
|
|
using Kurisu.AspNetCore.DataAccess.SqlSugar.Aop;
|
|
using Kurisu.AspNetCore.UnifyResultAndValidation;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Dlhis.Middle.Controllers;
|
|
|
|
/// <summary>
|
|
/// 订单
|
|
/// </summary>
|
|
[Route("api/canteen/[controller]")]
|
|
[ApiController]
|
|
public class OrdersController : ControllerBase
|
|
{
|
|
private readonly IOrderService _orderService;
|
|
|
|
public OrdersController(IOrderService orderService)
|
|
{
|
|
_orderService = orderService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 消费
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[IgnoreTenant]
|
|
public async Task<DefaultApiResult<OrderResultResponse>> AddAsync(OrderAddRequest request)
|
|
{
|
|
return await _orderService.AddAsync(request);
|
|
}
|
|
} |