diff --git a/Myshipping.Application/Service/BookingOrderContact/BookingOrderContactService.cs b/Myshipping.Application/Service/BookingOrderContact/BookingOrderContactService.cs index fc8c8295..4cadd0fc 100644 --- a/Myshipping.Application/Service/BookingOrderContact/BookingOrderContactService.cs +++ b/Myshipping.Application/Service/BookingOrderContact/BookingOrderContactService.cs @@ -110,17 +110,16 @@ namespace Myshipping.Application /// /// [HttpPost("/BookingOrderContact/savebatch"), SqlSugarUnitOfWork] - public async Task SaveBatch(List input) + public async Task SaveBatch(List input,long bookingId) { - if (input!=null||input.Count==0) { - throw Oops.Oh($"请传入正确数据"); - } - var bookingId = input.First().BookingId; _rep.Delete(x => x.BookingId == bookingId); - foreach (var item in input) - { - await _rep.InsertAsync(item.Adapt()); + if (input!=null&&input.Count>0) { + foreach (var item in input) + { + await _rep.InsertAsync(item.Adapt()); + } } + } /////