public Task <AsyncTaskResult> HandleAsync(StoreOrderExpressedEvent evnt)
 {
     return(_commandService.SendAsync(CreatedNotificationCommand(
                                          evnt.AggregateRootId,
                                          "订单已发货",
                                          NotificationType.StoreOrderDelivered,
                                          evnt.AggregateRootId)));
 }
 public Task <AsyncTaskResult> HandleAsync(StoreOrderExpressedEvent evnt)
 {
     return(TryUpdateRecordAsync(connection =>
     {
         return connection.UpdateAsync(new
         {
             DeliverExpressName = evnt.ExpressInfo.ExpressName,
             DeliverExpressCode = evnt.ExpressInfo.ExpressCode,
             DeliverExpressNumber = evnt.ExpressInfo.ExpressNumber,
             Status = (int)StoreOrderStatus.Expressing,
             Version = evnt.Version
         }, new
         {
             Id = evnt.AggregateRootId,
             //Version = evnt.Version - 1
         }, ConfigSettings.StoreOrderTable);
     }));
 }
Example #3
0
 private void Handle(StoreOrderExpressedEvent evnt)
 {
     _status = StoreOrderStatus.Expressing;
 }