You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.7 KiB
59 lines
1.7 KiB
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;
|
|
|
|
/// <summary>
|
|
/// 预约订单
|
|
/// </summary>
|
|
[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;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 预约订单查询
|
|
/// </summary>
|
|
/// <param name="req"></param>
|
|
/// <returns></returns>
|
|
[HttpPost("Page")]
|
|
public async Task<Result<PageResult<AmtOrderInfo>>> QueryPage([FromBody] QueryAmtOrderInfoPageReq req)
|
|
{
|
|
return Result<PageResult<AmtOrderInfo>>.Success(_amtOrderInfoService.AppQuerySwapOrder(req));
|
|
}
|
|
/// <summary>
|
|
/// 添加预约单
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("add")]
|
|
public async Task<Result<string>> AddTeam([FromBody] [Required] AddAmtOrderInfoReq input)
|
|
{
|
|
return await _amtOrderInfoService.InsertAmtOrder(input);
|
|
}
|
|
/// <summary>
|
|
/// 取消预约订单
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("CancelAmtOrder")]
|
|
public async Task<Result<string>> CancelAmtOrder([FromBody] [Required] DeleteAmtOrderInfoReq input)
|
|
{
|
|
return await _amtOrderInfoService.CancelAmtOrder(input);
|
|
}
|
|
} |