track/src/SJZY.Track.Application/CAP/EventHandlers/PullChangeBottomLineUpdateOrderEventHandler.cs

26 lines
913 B
C#

using DotNetCore.CAP;
using SJZY.Track.Application.Contract.Events;
using SJZY.Track.Domain.Aggregates.OrderAggregate;
using SJZY.Track.Domain.Consts;
using Volo.Abp.DependencyInjection;
namespace SJZY.Track.Application.CAP.EventHandlers;
/// <summary>
/// 拉去轨迹后,执行了兜底操作还是失败的标记操作
/// </summary>
public class PullChangeBottomLineUpdateOrderEventHandler :ITransientDependency, ICapSubscribe
{
private readonly IOrderRepository _orderRepository;
public PullChangeBottomLineUpdateOrderEventHandler(IOrderRepository orderRepository)
{
_orderRepository = orderRepository;
}
[CapSubscribe(GlobalConst.PullChangeBottomLineUpdateOrderSubscribe)]
public async Task ConsumerAsync(PullChangeBottomLineUpdateOrderEvent @event)
{
var rows =await _orderRepository.UpdateBatchIdsAsync(@event.OrderIds, @event.DeficiencyTagValue);
}
}