|
@@ -0,0 +1,25 @@
|
|
|
+using Hotline.Application.Orders;
|
|
|
+using Hotline.DataSharing.Province.Notifications;
|
|
|
+using Hotline.Orders;
|
|
|
+using MediatR;
|
|
|
+
|
|
|
+namespace Hotline.Application.Handlers.Order
|
|
|
+{
|
|
|
+ public class AddOrderComplementAsyncNotifyHandler : INotificationHandler<AddOrderComplementAsyncNotify>
|
|
|
+ {
|
|
|
+ private readonly IOrderDomainService _orderDomainService;
|
|
|
+
|
|
|
+ public AddOrderComplementAsyncNotifyHandler(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(AddOrderComplementAsyncNotify notification, CancellationToken cancellationToken)
|
|
|
+ {
|
|
|
+ await _orderDomainService.AddOrderComplementAsync(notification.OrderComplementDto, cancellationToken);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|