Merge branch 'S02-轨迹中台第二部分' into test

This commit is contained in:
李鹏军 2024-03-26 09:37:57 +08:00
commit 43acd4a619

View File

@ -86,10 +86,10 @@ public class TrackPullService : ApplicationService
}
var orders = await _provideQueries.FindOrderWithServiceProviderAsync(config.ServiceProviderId);
var serviceProviderCode = orders.FirstOrDefault()?.ServiceProviderCode;
foreach (var group in orders.GroupBy(x =>
new TrackRefreshAttach(x.ServiceProviderId, x.ServiceProviderCode, x.SubSystemId,
x.OrderType)))
new { x.SubSystemId, x.OrderType }))
{
var data = group.Select(x => new
{
@ -98,8 +98,10 @@ public class TrackPullService : ApplicationService
// 批量获取轨迹
await _httpClientProxy.Service.BatchForwardThenPushToQueueAsync(
InterfaceRelayConst.GetTrackInterfaceCode, group.Key.ServiceProviderCode, data,
GlobalConst.TrackRefreshSubscribe, JsonConvert.SerializeObject(group.Key));
InterfaceRelayConst.GetTrackInterfaceCode, serviceProviderCode, data,
GlobalConst.TrackRefreshSubscribe,
JsonConvert.SerializeObject(new TrackRefreshAttach(config.ServiceProviderId, serviceProviderCode!,
group.Key.SubSystemId, group.Key.OrderType)));
}
await RedisHelper.Client.SetExAsync(redisKey, config.PullInterval * 60, orders.Count);