using System.ComponentModel.DataAnnotations;
using Entity.Api.Req;
using Entity.DbModel.Station;
using HybirdFrameworkCore.Entity;
using log4net;
using Microsoft.AspNetCore.Mvc;
using Service.Station;
namespace WebStarter.Controllers;
///
/// 预约订单
///
[ApiController]
[Route("api/[controller]")]
public class AmtOrderInfoController : ControllerBase
{
private static readonly ILog Log = LogManager.GetLogger(typeof(AmtOrderInfoController));
private readonly AmtOrderInfoService _amtOrderInfoService;
public AmtOrderInfoController(AmtOrderInfoService amtOrderInfoService)
{
this._amtOrderInfoService = amtOrderInfoService;
}
///
/// 预约订单查询
///
///
///
[HttpPost("Page")]
public async Task>> QueryPage([FromBody] QueryAmtOrderInfoPageReq req)
{
return Result>.Success(_amtOrderInfoService.AppQuerySwapOrder(req));
}
///
/// 添加预约单
///
///
///
[HttpPost]
[Route("add")]
public async Task> AddTeam([FromBody] [Required] AddAmtOrderInfoReq input)
{
return await _amtOrderInfoService.InsertAmtOrder(input);
}
///
/// 取消预约订单
///
///
///
[HttpPost]
[Route("CancelAmtOrder")]
public async Task> CancelAmtOrder([FromBody] [Required] DeleteAmtOrderInfoReq input)
{
return await _amtOrderInfoService.CancelAmtOrder(input);
}
}