关系人保存

optimize
wet 2 years ago
parent 084715fe39
commit 504b642ba2

@ -110,19 +110,18 @@ namespace Myshipping.Application
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost("/BookingOrderContact/savebatch"), SqlSugarUnitOfWork] [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); _rep.Delete(x => x.BookingId == bookingId);
if (input!=null&&input.Count>0) {
foreach (var item in input) foreach (var item in input)
{ {
await _rep.InsertAsync(item.Adapt<BookingOrderContact>()); await _rep.InsertAsync(item.Adapt<BookingOrderContact>());
} }
} }
}
///// <summary> ///// <summary>
///// 获取订舱关系人列表 ///// 获取订舱关系人列表
///// </summary> ///// </summary>

Loading…
Cancel
Save