35 lines
1.3 KiB
C#
35 lines
1.3 KiB
C#
using DotNetCore.CAP;
|
||
using Newtonsoft.Json;
|
||
using SJZY.InterfaceRelay.Application.Contracts;
|
||
using SJZY.Track.Application.Contract.Dtos.ProvideServices;
|
||
using SJZY.Track.Domain.Aggregates.OrderAggregate;
|
||
using SJZY.Track.Domain.Queries;
|
||
using Volo.Abp.DependencyInjection;
|
||
|
||
namespace SJZY.Track.Application.EventHandlers;
|
||
|
||
public class InterfaceRelayTrackRefreshEventHandler : ITransientDependency, ICapSubscribe
|
||
{
|
||
private readonly IOrderRepository _orderRepository;
|
||
private readonly IProvideQueries _provideQueries;
|
||
|
||
public InterfaceRelayTrackRefreshEventHandler(IOrderRepository orderRepository, IProvideQueries provideQueries)
|
||
{
|
||
_orderRepository = orderRepository;
|
||
_provideQueries = provideQueries;
|
||
}
|
||
|
||
[CapSubscribe(GlobalConst.InterfaceRelayTrackRefreshSubscribe)]
|
||
public async Task ConsumerAsync(InterfaceRelayTrackRefreshEvent @event)
|
||
{
|
||
if (@event.RequestParams is List<OrderNoInfo> requestParams)
|
||
{
|
||
var orderNos = requestParams.Select(x => x.OrderNo).ToList();
|
||
|
||
// tips:attach返回的是服务商id,必有
|
||
var pullContentConfigs = await _provideQueries.GetPullContentConfigsAsync(int.Parse(@event.Attach));
|
||
|
||
// 轨迹清洗入库
|
||
}
|
||
}
|
||
} |