提单确认保存返回id

optimize
wanghaomei 2 years ago
parent 1dd6dbf138
commit 954b36e7dd

@ -2015,19 +2015,22 @@ namespace Myshipping.Application
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/BookingSampleBill/Save")]
public async Task SampleBillSave(UpdateBookingSampleBillInput input)
public async Task<long> SampleBillSave(UpdateBookingSampleBillInput input)
{
BookingSampleBill entity = null;
if (input.Id == 0)
{
var entity = input.Adapt<BookingSampleBill>();
entity = input.Adapt<BookingSampleBill>();
await _repSampleBill.InsertAsync(entity);
}
else
{
var entity = _repSampleBill.FirstOrDefault(x => x.BookingId == input.Id);
entity = _repSampleBill.FirstOrDefault(x => x.BookingId == input.Id);
entity = input.Adapt(entity);
await _repSampleBill.UpdateAsync(entity);
}
return entity.Id;
}
/// <summary>

Loading…
Cancel
Save