track/src/SJZY.Track.Application/EventHandlers/InterfaceRelayTrackRefreshEventHandler.cs

35 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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));
// 轨迹清洗入库
}
}
}