新增编辑修改

booking_auth_dev
wet 2 years ago
parent f672323be3
commit cf45380061

@ -282,6 +282,8 @@ namespace Myshipping.Application
.ToPagedListAsync(input.PageNo, input.PageSize); .ToPagedListAsync(input.PageNo, input.PageSize);
return entities.XnPagedResult(); return entities.XnPagedResult();
} }
[HttpPost("/BookingOrder/AddOrUpdate")] [HttpPost("/BookingOrder/AddOrUpdate")]
public async Task<long> AddOrUpdate(BookingOrderDto Dto) public async Task<long> AddOrUpdate(BookingOrderDto Dto)
{ {
@ -289,22 +291,15 @@ namespace Myshipping.Application
{ {
throw Oops.Bah("请传入正常数据!"); throw Oops.Bah("请传入正常数据!");
} }
if (Dto.Id == 0) if (Dto.Id == 0)
{ {
return await Add(Dto); return await Add(Dto);
} }
else else
{ {
await Update(Dto); await Update(Dto);
return Dto.Id; return Dto.Id;
} }
} }
/// <summary> /// <summary>
@ -313,7 +308,7 @@ namespace Myshipping.Application
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[SqlSugarUnitOfWork] [SqlSugarUnitOfWork]
[NonAction] [HttpPost("/BookingOrder/Add")]
public async Task<long> Add(BookingOrderDto input) public async Task<long> Add(BookingOrderDto input)
{ {
@ -424,7 +419,7 @@ namespace Myshipping.Application
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[SqlSugarUnitOfWork] [SqlSugarUnitOfWork]
[NonAction] [HttpPost("/BookingOrder/Update")]
public async Task Update(BookingOrderDto input) public async Task Update(BookingOrderDto input)
{ {
if (input.ParentId == 0) if (input.ParentId == 0)

Loading…
Cancel
Save