Merge branch 'S02-轨迹中台第二部分' into test
This commit is contained in:
commit
43acd4a619
@ -86,10 +86,10 @@ public class TrackPullService : ApplicationService
|
|||||||
}
|
}
|
||||||
|
|
||||||
var orders = await _provideQueries.FindOrderWithServiceProviderAsync(config.ServiceProviderId);
|
var orders = await _provideQueries.FindOrderWithServiceProviderAsync(config.ServiceProviderId);
|
||||||
|
var serviceProviderCode = orders.FirstOrDefault()?.ServiceProviderCode;
|
||||||
|
|
||||||
foreach (var group in orders.GroupBy(x =>
|
foreach (var group in orders.GroupBy(x =>
|
||||||
new TrackRefreshAttach(x.ServiceProviderId, x.ServiceProviderCode, x.SubSystemId,
|
new { x.SubSystemId, x.OrderType }))
|
||||||
x.OrderType)))
|
|
||||||
{
|
{
|
||||||
var data = group.Select(x => new
|
var data = group.Select(x => new
|
||||||
{
|
{
|
||||||
@ -98,8 +98,10 @@ public class TrackPullService : ApplicationService
|
|||||||
|
|
||||||
// 批量获取轨迹
|
// 批量获取轨迹
|
||||||
await _httpClientProxy.Service.BatchForwardThenPushToQueueAsync(
|
await _httpClientProxy.Service.BatchForwardThenPushToQueueAsync(
|
||||||
InterfaceRelayConst.GetTrackInterfaceCode, group.Key.ServiceProviderCode, data,
|
InterfaceRelayConst.GetTrackInterfaceCode, serviceProviderCode, data,
|
||||||
GlobalConst.TrackRefreshSubscribe, JsonConvert.SerializeObject(group.Key));
|
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);
|
await RedisHelper.Client.SetExAsync(redisKey, config.PullInterval * 60, orders.Count);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user