Exemplo n.º 1
0
        public void CheckConfirmedGracePeriodOrders()
        {
            var orderIds = GetConfirmedGracePeriodOrders();

            foreach (var orderId in orderIds)
            {
                var confirmGracePeriodEvent = new GracePeriodConfirmedIntegrationEvent(orderId);
                _eventBus.Publish(confirmGracePeriodEvent);
            }
        }
        private void CheckConfirmedGracePeriodOrders()
        {
            _logger.LogDebug($"Checking confirmed grace period orders");

            var orderIds = GetConfirmedGracePeriodOrders();

            foreach (var orderId in orderIds)
            {
                var confirmGracePeriodEvent = new GracePeriodConfirmedIntegrationEvent(orderId);
                _endpoint.Publish(confirmGracePeriodEvent).GetAwaiter().GetResult();
            }
        }
        //检查宽限期内已确认的订单集
        private void CheckConfirmedGracePeriodOrders()
        {
            _logger.LogDebug($"正在检查已确认的订单");

            var orderIds = this.GetConfirmedGracePeriodOrders();

            foreach (var orderId in orderIds)
            {
                var gracePeriodConfirmedIntegrationEvent = new GracePeriodConfirmedIntegrationEvent(orderId);
                this._eventBus.Publish(gracePeriodConfirmedIntegrationEvent);
            }
        }
Exemplo n.º 4
0
        private void CheckConfirmedGracePeriodOrders()
        {
            _logger.LogDebug($"Checking confirmed grace period orders");

            var orderIds = GetConfirmedGracePeriodOrders();

            _logger.LogDebug($"GracePeriod sent a .");
            foreach (var orderId in orderIds)
            {
                var gracePeriodConfirmedEvent = new GracePeriodConfirmedIntegrationEvent(orderId);
                _eventBus.Publish(gracePeriodConfirmedEvent);
            }
        }
        private void CheckConfirmedGracePeriodOrders()
        {
            _logger.LogDebug("Checking confirmed grace period orders");

            var orderIds = GetConfirmedGracePeriodOrders();

            foreach (var orderId in orderIds)
            {
                var confirmGracePeriodEvent = new GracePeriodConfirmedIntegrationEvent(orderId);

                _logger.LogInformation("----- Publishing integration event: {IntegrationEventId} from {AppName} - ({@IntegrationEvent})", confirmGracePeriodEvent.Id, Program.AppName, confirmGracePeriodEvent);

                _eventBus.Publish(confirmGracePeriodEvent);
            }
        }
 public async Task OrderStarted(GracePeriodConfirmedIntegrationEvent @event)
 {
     var handler = _serviceProvider.GetRequiredService <GracePeriodConfirmedIntegrationEventHandler>();
     await handler.Handle(@event);
 }