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.Authorization; using Microsoft.AspNetCore.Mvc; namespace Dlhis.Middle.Controllers; /// /// 订单 /// [Authorize] [Route("api/[controller]")] [ApiController] public class OrdersController : ControllerBase { private readonly IOrderService _orderService; public OrdersController(IOrderService orderService) { _orderService = orderService; } /// /// 消费 /// /// /// [Authorize(Policy = "consumer")] [HttpPost] [IgnoreTenant] public async Task> AddAsync(OrderAddRequest request) { return await _orderService.AddAsync(request); } }