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); })); }
private void Handle(NewShopCashTransferAcceptedEvent evnt) { _shopCashTransfers.Add(evnt.TransferId); _shopCash = evnt.FinallyValue; _walletStatisticInfo = evnt.StatisticInfo; }
/// <summary> /// 钱包接受记录值,更新记录状态为成功 /// </summary> /// <param name="evnt"></param> /// <returns></returns> public Task <AsyncTaskResult> HandleAsync(NewShopCashTransferAcceptedEvent evnt) { return(_commandService.SendAsync( new SetShopCashTransferSuccessCommand(evnt.TransferId, evnt.FinallyValue) )); }