master
zhangxiaofeng 7 months ago
parent a3d88e0634
commit aaf582b935

@ -378,7 +378,7 @@ namespace Myshipping.Application
string statusDesc = $"{STATUS_SEND}(单号:{waybillNo}";
// 不需要等待的任务,并且不会因为异常导致当前请求终止
_ = Task.Run(async () =>
_ = Task.Run(() =>
{
#region 添加快递动态
try
@ -390,7 +390,7 @@ namespace Myshipping.Application
StatusCode = "DJY03",
StatusDesc = statusDesc
};
await _statusRep.InsertAsync(status);
_statusRep.Insert(status);
}
catch (Exception ex)
{
@ -401,8 +401,8 @@ namespace Myshipping.Application
#region 为与快递关联的订舱添加动态
try
{
List<string> mblnoList = await _businessRep.AsQueryable(b => b.PId == Id).Select(b => b.MBLNO).ToListAsync();
_ = InsertNewBookingStatusWithMblnoList(mblnoList, statusDesc);
List<string> mblnoList = _businessRep.AsQueryable(b => b.PId == Id).Select(b => b.MBLNO).ToList();
_= InsertNewBookingStatusWithMblnoList(mblnoList, statusDesc);
}
catch (Exception ex)
{
@ -413,9 +413,9 @@ namespace Myshipping.Application
#region 维护地址簿
try
{
if (!await _addressRep.IsExistsAsync(a => a.People == order.SJPeople && a.Tel == order.SJTel))
if (!_addressRep.IsExists(a => a.People == order.SJPeople && a.Tel == order.SJTel))
{
await _addressRep.InsertAsync(new ExpressDeliveryAddress()
_addressRep.Insert(new ExpressDeliveryAddress()
{
Address = order.SJAddress,
City = order.SJCity,
@ -427,9 +427,9 @@ namespace Myshipping.Application
Type = 1
});
}
if (!await _addressRep.IsExistsAsync(a => a.People == order.FJPeople && a.Tel == order.FJTel))
if (!_addressRep.IsExists(a => a.People == order.FJPeople && a.Tel == order.FJTel))
{
await _addressRep.InsertAsync(new ExpressDeliveryAddress()
_addressRep.Insert(new ExpressDeliveryAddress()
{
Address = order.FJAddress,
City = order.FJCity,

Loading…
Cancel
Save