optimize
wanghaomei 12 months ago
parent 5689a273ac
commit fa6e8e00f4

@ -1042,7 +1042,16 @@ namespace Myshipping.Application
Task.Run(async () =>
{
await Task.Delay(3000);
await UpdateMblno(entity);
try
{
await UpdateMblno(entity);
}
catch (Exception ex)
{
_logger.LogWarning($"未能成功新增运踪订阅:{entity.Id} {entity.MBLNO}");
_logger.LogError(ex.Message);
_logger.LogError(ex.StackTrace);
}
});
@ -1137,7 +1146,11 @@ namespace Myshipping.Application
lstPropName.Add(pchg.Name);
}
});
await _rep.AsUpdateable(entity).UpdateColumns(lstPropName.ToArray()).ExecuteCommandAsync();
if (lstPropName.Count > 0)
{
await _rep.AsUpdateable(entity).UpdateColumns(lstPropName.ToArray()).ExecuteCommandAsync();
}
}
//await _rep.AsUpdateable(entity).IgnoreColumns(it => new
//{
@ -1266,8 +1279,16 @@ namespace Myshipping.Application
{
_logger.LogWarning($"更新运踪异步方法执行");
await Task.Delay(3000);
await UpdateMblno(entity);
try
{
await UpdateMblno(entity);
}
catch (Exception ex)
{
_logger.LogWarning($"未能成功更新运踪订阅:{entity.Id} {entity.MBLNO}");
_logger.LogError(ex.Message);
_logger.LogError(ex.StackTrace);
}
});
if (!string.IsNullOrEmpty(reqId))

Loading…
Cancel
Save