예제 #1
0
 public Task <AsyncTaskResult> HandleAsync(NewShopCashTransferAcceptedEvent evnt)
 {
     return(TryUpdateRecordAsync(connection =>
     {
         return connection.UpdateAsync(new
         {
             ShopCash = evnt.FinallyValue,
             YesterdayEarnings = evnt.StatisticInfo.YesterdayEarnings,
             Earnings = evnt.StatisticInfo.Earnings,
             YesterdayIndex = evnt.StatisticInfo.YesterdayIndex,
             BenevolenceTotal = evnt.StatisticInfo.BenevolenceTotal,
             TodayBenevolenceAdded = evnt.StatisticInfo.TodayBenevolenceAdded,
             UpdatedOn = evnt.StatisticInfo.UpdatedOn,
             Version = evnt.Version,
             EventSequence = evnt.Sequence
         }, new
         {
             Id = evnt.AggregateRootId,
             UserId = evnt.UserId,
             //Version = evnt.Version - 1
         }, ConfigSettings.WalletTable);
     }));
 }
예제 #2
0
파일: Wallet.cs 프로젝트: zanderphh/Shop
 private void Handle(NewShopCashTransferAcceptedEvent evnt)
 {
     _shopCashTransfers.Add(evnt.TransferId);
     _shopCash            = evnt.FinallyValue;
     _walletStatisticInfo = evnt.StatisticInfo;
 }
예제 #3
0
 /// <summary>
 /// 钱包接受记录值,更新记录状态为成功
 /// </summary>
 /// <param name="evnt"></param>
 /// <returns></returns>
 public Task <AsyncTaskResult> HandleAsync(NewShopCashTransferAcceptedEvent evnt)
 {
     return(_commandService.SendAsync(
                new SetShopCashTransferSuccessCommand(evnt.TransferId, evnt.FinallyValue)
                ));
 }