public IEnumerable <ShopCashTransfer> GetShopCashTransfers(Guid walletId, ShopCashTransferType type) { using (var connection = GetConnection()) { return(connection.QueryList <ShopCashTransfer>(new { WalletId = walletId, Type = (int)type }, ConfigSettings.ShopCashTransferTable)); } }
private void Handle(ShopCashTransferCreatedEvent evnt) { _id = evnt.AggregateRootId; _nunber = evnt.Number; _info = evnt.Info; _type = evnt.Type; _status = evnt.Status; _walletId = evnt.WalletId; }
public CreateShopCashTransferCommand(Guid id, Guid walletId, string number, ShopCashTransferType type, ShopCashTransferStatus status, decimal amount, decimal fee, WalletDirection direction, string remark) : base(id) { WalletId = walletId; Number = number; Type = type; Status = status; Amount = amount; Fee = fee; Direction = direction; Remark = remark; }
public ShopCashTransferCreatedEvent(Guid walletId, string number, ShopCashTransferInfo info, ShopCashTransferType type, ShopCashTransferStatus status) : base(walletId, number) { Info = info; Type = type; Status = status; }
private ShopCashTransferStatus _status; //状态 public ShopCashTransfer(Guid id, Guid walletId, string number, ShopCashTransferInfo info, ShopCashTransferType type, ShopCashTransferStatus status) : base(id) { id.CheckNotEmpty(nameof(id)); walletId.CheckNotEmpty(nameof(walletId)); info.CheckNotNull(nameof(info)); ApplyEvent(new ShopCashTransferCreatedEvent(walletId, number, info, type, status)); }