12345678910111213141516171819202122232425262728293031323334353637 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Hotline.FlowEngine;
- using Hotline.FlowEngine.Notifications;
- using Hotline.Orders;
- using MediatR;
- namespace Hotline.Application.Handlers.FlowEngine
- {
- public class OrderFinalManageHandler : INotificationHandler<OrderFinalManageNotify>
- {
- private readonly IOrderDomainService _orderDomainService;
- public OrderFinalManageHandler(IOrderDomainService orderDomainService)
- {
- _orderDomainService = orderDomainService;
- }
- /// <summary>Handles a notification</summary>
- /// <param name="notification">The notification</param>
- /// <param name="cancellationToken">Cancellation token</param>
- public async Task Handle(OrderFinalManageNotify notification, CancellationToken cancellationToken)
- {
- var workflow = notification.Workflow;
- switch (workflow.ModuleCode)
- {
- case WorkflowModuleConsts.OrderManage:
- await _orderDomainService.FinalManageAsync(notification.Workflow.ExternalId, cancellationToken);
- break;
- }
- }
- }
- }
|