public decimal GetMoneyOfWithdrawed(long userId) { return(WalletRecordRepository.GetAll().Where(model => model.Type == WalletRecordType.Withdraw && model.FetchStatus == FetchStatus.Success && model.UserId == userId ).Sum(od => ((decimal?)od.Money)).GetValueOrDefault()); }
public decimal GetMoneyOfRecharge(long userId) { return(WalletRecordRepository.GetAll().Where(model => model.Type == WalletRecordType.Recharge && model.UserId == userId).Sum(od => ((decimal?)od.Money)).GetValueOrDefault()); }