From cf4538006199d0c49cee2106a4e3508a67c234c1 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Tue, 29 Nov 2022 11:21:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/BookingOrder/BookingOrderService.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 029a0376..25e90e1f 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -282,6 +282,8 @@ namespace Myshipping.Application .ToPagedListAsync(input.PageNo, input.PageSize); return entities.XnPagedResult(); } + + [HttpPost("/BookingOrder/AddOrUpdate")] public async Task AddOrUpdate(BookingOrderDto Dto) { @@ -289,22 +291,15 @@ namespace Myshipping.Application { throw Oops.Bah("请传入正常数据!"); } - if (Dto.Id == 0) { return await Add(Dto); - - } else { - await Update(Dto); return Dto.Id; } - - - } /// @@ -313,7 +308,7 @@ namespace Myshipping.Application /// /// [SqlSugarUnitOfWork] - [NonAction] + [HttpPost("/BookingOrder/Add")] public async Task Add(BookingOrderDto input) { @@ -424,7 +419,7 @@ namespace Myshipping.Application /// /// [SqlSugarUnitOfWork] - [NonAction] + [HttpPost("/BookingOrder/Update")] public async Task Update(BookingOrderDto input) { if (input.ParentId == 0)