|
|
|
@ -110,17 +110,16 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost("/BookingOrderContact/savebatch"), SqlSugarUnitOfWork]
|
|
|
|
|
public async Task SaveBatch(List<UpdateBookingOrderContactInput> input)
|
|
|
|
|
public async Task SaveBatch(List<UpdateBookingOrderContactInput> 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<BookingOrderContact>());
|
|
|
|
|
if (input!=null&&input.Count>0) {
|
|
|
|
|
foreach (var item in input)
|
|
|
|
|
{
|
|
|
|
|
await _rep.InsertAsync(item.Adapt<BookingOrderContact>());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
///// <summary>
|
|
|
|
|