Merge branch 'S02-轨迹中台' into test

This commit is contained in:
李鹏军 2024-03-16 11:33:14 +08:00
commit 26b3483c36
2 changed files with 7 additions and 5 deletions

View File

@ -40,14 +40,16 @@ public class TrackPullService : ApplicationService
{ {
// todo:罚时? // todo:罚时?
input.OrderNos = input.OrderNos.Where(x => !x.IsNullOrWhiteSpace()).Distinct().ToList(); // 单号去重、去空 input.OrderNos = input.OrderNos.Where(x => !x.IsNullOrWhiteSpace()).Distinct().ToList(); // 单号去重、去空
if (input.OrderNos.Count == 0)
{
throw new BusinessException(message: "订单一个都不存在");
}
// 这里没有区分订单类型,就算的不同类型的单一起刷新了也无所谓 // 这里没有区分订单类型,就算的不同类型的单一起刷新了也无所谓
var orders = await _provideQueries.FindOrderWithServiceProviderAsync(input.OrderNos); var orders = await _provideQueries.FindOrderWithServiceProviderAsync(input.OrderNos);
if (orders.Count == 0)
{
throw new BusinessException(message: "一个拉取配置都不存在");
}
foreach (var group in orders.GroupBy(x => foreach (var group in orders.GroupBy(x =>
new TrackRefreshAttach(x.ServiceProviderId, x.ServiceProviderCode, x.SubSystemId, x.OrderType))) new TrackRefreshAttach(x.ServiceProviderId, x.ServiceProviderCode, x.SubSystemId, x.OrderType)))
{ {

View File

@ -46,7 +46,7 @@ public class TrackPushService : ApplicationService
x.Id, x.OrderNo, x.SubSystemId, x.CustomId x.Id, x.OrderNo, x.SubSystemId, x.CustomId
}); });
if (input.OrderNos.Count == 0) if (orders.Count == 0)
{ {
throw new BusinessException(message: "一个推送配置都不存在"); throw new BusinessException(message: "一个推送配置都不存在");
} }