From a4b53ae88b588b099cf0e334f99d74d229f7fdc2 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期三, 09 四月 2025 17:59:15 +0800 Subject: [PATCH] fix: s --- LifePayment/LifePayment.Application/LifePay/StatisticsService.cs | 165 ++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 109 insertions(+), 56 deletions(-) diff --git a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs index 477b532..17ab4c9 100644 --- a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs +++ b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs @@ -20,6 +20,7 @@ using ZeroD.Util; using NPOI.SS.Formula.Functions; using System.Security.Principal; +using StackExchange.Redis; namespace LifePayment.Application.LifePay { @@ -59,16 +60,16 @@ var statistics = await _dallyStatisticsRepository.Where(x => x.CreationTime.Date == today) .WhereIf(channleList.Count() > 0, x => channleList.Contains(x.ChannelId)) .ToListAsync(); + var totalRechargeReceipts = await _lifePayRechargeReceiptsRepository.Where(x => x.CreationTime < today).SumAsync(x => x.RechargeAmount); if (statistics == null || statistics.Count() == 0) { TopStatisticsOutput topStatisticsOutput = new TopStatisticsOutput() { }; - var allChannle = await _lifePayChannlesRep.Where(x => x.IsDeleted == false).ToListAsync(); + var allChannle = await _lifePayChannlesRep.ToListAsync(); foreach (var item in allChannle) { var entity = await TopStatistics(item.ChannlesNum, today); if (channleList.Count() == 0 || channleList.Contains(item.ChannlesNum)) { - topStatisticsOutput.Amount += entity.Amount; topStatisticsOutput.AccumulatedReceipts += entity.AccumulatedReceipts; topStatisticsOutput.AccumulatedIncome += entity.AccumulatedIncome; topStatisticsOutput.ReceiptsYesterday += entity.ReceiptsYesterday; @@ -78,15 +79,23 @@ topStatisticsOutput.YesterdayFail += entity.YesterdayFail; topStatisticsOutput.AccumulatedUsers += entity.AccumulatedUsers; topStatisticsOutput.YesterdayActiveUsers += entity.YesterdayActiveUsers; + topStatisticsOutput.AccumulatedChannlesRakePrice += entity.AccumulatedChannlesRakePrice; } } + + if (channleList.Count() == 0) + { + /// 璐︽埛浣欓 + topStatisticsOutput.Amount = totalRechargeReceipts - await _lifePayOrderRepository.Where(x => x.ACOOLYStatus == ACOOLYStatusEnum.鍏呭�兼垚鍔� || x.ACOOLYStatus == ACOOLYStatusEnum.宸插畬鎴� || x.ACOOLYStatus == ACOOLYStatusEnum.閮ㄥ垎鍏呭�兼垚鍔�) + .SumAsync(x => x.PlatformDeductionAmount) ?? 0; + } + return topStatisticsOutput; } else { TopStatisticsOutput topStatisticsOutput = new TopStatisticsOutput() { - Amount = statistics.Sum(s => s.Amount), AccumulatedReceipts = statistics.Sum(s => s.AccumulatedReceipts), AccumulatedIncome = statistics.Sum(s => s.AccumulatedIncome), ReceiptsYesterday = statistics.Sum(s => s.ReceiptsYesterday), @@ -96,7 +105,15 @@ YesterdayFail = statistics.Sum(s => s.YesterdayFail), AccumulatedUsers = statistics.Sum(s => s.AccumulatedUsers), YesterdayActiveUsers = statistics.Sum(s => s.YesterdayActiveUsers), + AccumulatedChannlesRakePrice = statistics.Sum(s => s.AccumulatedChannlesRakePrice) }; + if (channleList.Count() == 0) + { + /// 璐︽埛浣欓 + topStatisticsOutput.Amount = totalRechargeReceipts - await _lifePayOrderRepository.Where(x => x.ACOOLYStatus == ACOOLYStatusEnum.鍏呭�兼垚鍔� || x.ACOOLYStatus == ACOOLYStatusEnum.宸插畬鎴� || x.ACOOLYStatus == ACOOLYStatusEnum.閮ㄥ垎鍏呭�兼垚鍔�) + .SumAsync(x => x.PlatformDeductionAmount) ?? 0; + } + return topStatisticsOutput; } } @@ -113,7 +130,7 @@ .WhereIf(channleList.Count() > 0, x => channleList.Contains(x.ChannelId)) .OrderBy(o => o.CreationTime) .ToListAsync(); - + CheckExtensions.IfTrueThrowUserFriendlyException(statistics == null, "鏀舵缁熻澶辫触"); var groupedStatistics = statistics .GroupBy(x => x.CreationTime) .Select(g => new @@ -127,14 +144,16 @@ foreach (var item in groupedStatistics) { + /// 瀹為檯鏀舵鏃ユ湡 + var creationTime = item.CreationTime.AddDays(-1).ToString("yyyy-MM-dd"); ReceiptsDetail receive = new ReceiptsDetail() { - CreationTime = item.CreationTime.AddDays(-1).ToString("yyyy-MM-dd"), + CreationTime = creationTime, Amount = item.TotalReceiptsYesterday }; ReceiptsDetail income = new ReceiptsDetail() { - CreationTime = item.CreationTime.AddDays(-1).ToString("yyyy-MM-dd"), + CreationTime = creationTime, Amount = item.TotalIncomeYesterday }; receiptsListOutPut.ReceiveList.Add(receive); @@ -144,13 +163,18 @@ return receiptsListOutPut; } + /// <summary> + /// 鑾峰彇30澶╀剑閲� + /// </summary> + /// <param name="channleList"></param> + /// <returns></returns> public async Task<ChannlesRakeListOutPut> GetChannlesRakeList(List<string> channleList) { var today = DateTime.Now.Date; - var statistics = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false && - x.FinishTime.Date <= today && x.FinishTime.Date >= today.AddDays(-30)) + var statistics = await _lifePayChannlesRakeRepository.Where(x => x.FinishTime.Date <= today && x.FinishTime.Date >= today.AddDays(-30)) .WhereIf(channleList.Count() > 0, x => channleList.Contains(x.ChannelId)) .ToListAsync(); + CheckExtensions.IfTrueThrowUserFriendlyException(statistics == null, "浣i噾缁熻澶辫触"); var groupedStatistics = statistics .GroupBy(x => x.FinishTime.ToString("yyyy-MM-dd")) .Select(g => new @@ -162,27 +186,31 @@ ChannlesRakeListOutPut channlesRakeListOutPut = new ChannlesRakeListOutPut(); - foreach (var item in groupedStatistics) + var dateList = Enumerable.Range(1, 31) + .Select(i => today.AddDays(-i)) + .ToList(); + foreach (var date in dateList) { + var stat = groupedStatistics.FirstOrDefault(g => g.FinishTime == date.ToString("yyyy-MM-dd")); ReceiptsDetail receive = new ReceiptsDetail() { - CreationTime = item.FinishTime, - Amount = item.ChannlesRakePrice + CreationTime = date.ToString("yyyy-MM-dd"), + Amount = stat?.ChannlesRakePrice ?? 0 }; - channlesRakeListOutPut.ChannlesRakeList.Add(receive); } return channlesRakeListOutPut; - } public async Task<ChannelDataListOutPut> GetChannelDataList(List<string> channleList) { - + int maxStatisticsNumber = 5; + /// 杩欓噷涓嶅姞鍏�.Where()浼氭姤閿� var statistics = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false) .WhereIf(channleList.Count() > 0, x => channleList.Contains(x.ChannelId)) - .ToListAsync(); + .ToListAsync(); + CheckExtensions.IfTrueThrowUserFriendlyException(statistics == null, "娓犻亾鏀舵缁熻澶辫触"); var groupedStatistics = statistics .GroupBy(x => x.ChannelId) .Select(g => new @@ -200,11 +228,11 @@ { ChannelDataReceive receive = new ChannelDataReceive() { - ChannelName = _lifePayChannlesRep.Where(x => x.ChannlesNum == item.ChannelId).FirstOrDefault().ChannlesName, + ChannelName = _lifePayChannlesRep.Where(x => x.ChannlesNum == item.ChannelId).FirstOrDefault()?.ChannlesName, ReceivePrice = item.ReceivePrice, ChannlesRakePrice = item.ChannlesRakePrice, }; - if (channelDataList.ReceiveList.Count() < 5) + if (channelDataList.ReceiveList.Count() < maxStatisticsNumber) { channelDataList.ReceiveList.Add(receive); } @@ -213,6 +241,7 @@ /// 绱鐢ㄦ埛 var users = await _lifePayUserRepository.Where(x => x.IsDeleted == false).WhereIf(channleList.Count() > 0, x => channleList.Contains(x.CreationChannleNum)) .ToListAsync(); + CheckExtensions.IfTrueThrowUserFriendlyException(statistics == null, "绱鐢ㄦ埛缁熻澶辫触"); var groupedUsers = users .GroupBy(x => x.CreationChannleNum) .Select(g => new @@ -226,10 +255,10 @@ { ChannelDataUserNumber usernumber = new ChannelDataUserNumber() { - ChannelName = _lifePayChannlesRep.Where(x => x.ChannlesNum == item.ChannelId).FirstOrDefault().ChannlesName, + ChannelName = _lifePayChannlesRep.Where(x => x.ChannlesNum == item.ChannelId).FirstOrDefault()?.ChannlesName, Number = item.Number, }; - if (channelDataList.UserNumberList.Count() < 5) + if (channelDataList.UserNumberList.Count() < maxStatisticsNumber) { channelDataList.UserNumberList.Add(usernumber); } @@ -238,54 +267,77 @@ return channelDataList; - } + public async Task StatisticsByDate(int days) + { + var today = DateTime.Now.Date; + for (var i = 0; i < days; i++) + { + var statistics = await _dallyStatisticsRepository.Where(x => x.CreationTime.Date == today) + .ToListAsync(); + + if (statistics == null || statistics.Count() == 0) + { + TopStatisticsOutput topStatisticsOutput = new TopStatisticsOutput() { }; + var allChannle = await _lifePayChannlesRep.ToListAsync(); + foreach (var item in allChannle) + { + var entity = await TopStatistics(item.ChannlesNum, today); + } + } + + today = today.AddDays(-1); + } + } private async Task<DallyStatistics> TopStatistics(string channleId, DateTime today) { - var totalRechargeReceipts = await _lifePayRechargeReceiptsRepository.Where(x => x.IsDeleted == false && x.CreationTime < today).SumAsync(x => x.RechargeAmount); - var accountBalance = totalRechargeReceipts - await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.PayStatus == LifePayStatusEnum.宸叉敮浠� - && (x.ACOOLYStatus == ACOOLYStatusEnum.鍏呭�兼垚鍔� || x.ACOOLYStatus == ACOOLYStatusEnum.宸插畬鎴� || x.ACOOLYStatus == ACOOLYStatusEnum.閮ㄥ垎鍏呭�兼垚鍔�)) - .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.PayAmount); - /// 绱鏀舵锛氱粺璁″钩鍙拌处鎴蜂笅璁㈠崟鍒涘缓鏃堕棿鍦ㄦ槰澶╁強涔嬪墠鏀跺埌鐨勩�愮敤鎴锋敮浠樻垚鍔熺殑閲戦-閫�娆剧粰鐢ㄦ埛鐨勯噾棰濄�戯紱 - var accumulatedReceipts = await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.PayStatus != LifePayStatusEnum.鏈敮浠�) - .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.PayAmount) - - await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.LifePayRefundStatus == LifePayRefundStatusEnum.宸查��娆�) - .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => (x.RefundPrice ?? 0)); - /// 鏄ㄦ棩鏀舵锛氱粺璁″钩鍙拌处鎴蜂笅璁㈠崟鍒涘缓鏃堕棿鍦ㄦ槰澶╂敹鍒扮殑銆愮敤鎴锋敮浠樻垚鍔熺殑閲戦-閫�娆剧粰鐢ㄦ埛鐨勯噾棰濄�戯紱 - var receiptsYesterday = await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.PayStatus == LifePayStatusEnum.宸叉敮浠�) - .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.PayAmount) - - await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.LifePayRefundStatus == LifePayRefundStatusEnum.宸查��娆�) - .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => (x.RefundPrice ?? 0)); - /// 绱鏀跺叆锛氱粺璁″钩鍙拌处鎴蜂笅璁㈠崟鐘舵�佷负鈥滃凡瀹屾垚鈥濅笖璁㈠崟鍒涘缓鏃堕棿鍦ㄦ槰澶╁強涔嬪墠鏀跺埌鐨勩�愮敤鎴峰疄浠橀噾棰�-骞冲彴鎵f閲戦-閮ㄥ垎閫�娆鹃噾棰濄�戯紱 - var accumulatedIncome = await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.LifePayOrderStatus == LifePayOrderStatusEnum.宸插畬鎴�) - .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.PayAmount - (x.PlatformDeductionAmount ?? 0) - (x.RefundPrice ?? 0)); - /// 鏄ㄦ棩鏀跺叆锛氱粺璁″钩鍙拌处鎴蜂笅璁㈠崟鐘舵�佷负鈥滃凡瀹屾垚鈥濅笖璁㈠崟鍒涘缓鏃堕棿鍦ㄦ槰澶╂敹鍒扮殑銆愮敤鎴峰疄浠橀噾棰�-骞冲彴鎵f閲戦-閮ㄥ垎閫�娆鹃噾棰濄�戯紱 - var yesterdayIncome = await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.LifePayOrderStatus == LifePayOrderStatusEnum.宸插畬鎴�) - .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.PayAmount - (x.PlatformDeductionAmount ?? 0) - (x.RefundPrice ?? 0)); - /// 绱涓嬪崟锛氱粺璁″钩鍙颁腑璁㈠崟涓嬪崟鏃堕棿鍦ㄦ槰澶╁強涔嬪墠鏃堕棿鐨勮鍗曡褰曪紱 - var accumulatedOrders = await _lifePayOrderRepository.Where(x => x.CreationTime < today).WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).CountAsync(); - /// 鏄ㄦ棩涓嬪崟锛氱粺璁″钩鍙颁腑璁㈠崟涓嬪崟鏃堕棿鍦ㄦ槰澶╃殑璁㈠崟璁板綍锛� - var ordersNumYesterday = await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today) - .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).CountAsync(); - /// 鏄ㄦ棩鎴愬姛锛氱粺璁″钩鍙颁腑璁㈠崟鐘舵�佷负鈥滃凡瀹屾垚/閮ㄥ垎鍏呭�兼垚鍔熲�濅笖璁㈠崟涓嬪崟鏃堕棿鍦ㄦ槰澶╃殑璁㈠崟璁板綍锛� - var yesterdaySuccess = await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.LifePayOrderStatus == LifePayOrderStatusEnum.宸插畬鎴�) - .WhereIf(string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).CountAsync(); - /// 鏄ㄦ棩澶辫触锛氱粺璁″钩鍙颁腑璁㈠崟鐘舵�佷负鈥滃厖鍊煎け璐�/宸查��娆锯�濅笖璁㈠崟涓嬪崟鏃堕棿鍦ㄦ槰澶╃殑璁㈠崟璁板綍锛� - var yesterdayFail = await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.LifePayOrderStatus == LifePayOrderStatusEnum.宸查��娆�) - .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).CountAsync(); - /// 绱鐢ㄦ埛 - var accumulatedUsers = await _lifePayUserRepository.Where(x => x.IsDeleted == false).WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.CreationChannleNum == channleId).CountAsync(); - /// 鏄ㄦ棩娲昏穬鐢ㄦ埛 - var yesterdayActiveUsers = await _lifePayUserRepository.Where(x => x.IsDeleted == false).WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.CreationChannleNum == channleId).Where(x => x.LastLoginTime >= today.AddDays(-1)).CountAsync(); + var lifepayOrderBaseList = await _lifePayOrderRepository.Where(x => x.CreationTime < today) + .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).ToListAsync(); + /// 绱鏀舵锛氱粺璁″钩鍙拌处鎴蜂笅璁㈠崟鍒涘缓鏃堕棿鍦ㄦ槰澶╁強涔嬪墠鏀跺埌鐨勩�愮敤鎴锋敮浠樻垚鍔熺殑閲戦-閫�娆剧粰鐢ㄦ埛鐨勯噾棰濄�戯紱 + var accumulatedReceipts = lifepayOrderBaseList.Where(x => x.PayStatus != LifePayStatusEnum.鏈敮浠�).Sum(x => x.PayAmount) + - lifepayOrderBaseList.Where(x => x.LifePayRefundStatus == LifePayRefundStatusEnum.宸查��娆�).Sum(x => (x.RefundPrice ?? 0)); + + /// 鏄ㄦ棩鏀舵锛氱粺璁″钩鍙拌处鎴蜂笅璁㈠崟鍒涘缓鏃堕棿鍦ㄦ槰澶╂敹鍒扮殑銆愮敤鎴锋敮浠樻垚鍔熺殑閲戦-閫�娆剧粰鐢ㄦ埛鐨勯噾棰濄�戯紱 + var receiptsYesterday = lifepayOrderBaseList.Where(x => x.CreationTime >= today.AddDays(-1) && x.PayStatus == LifePayStatusEnum.宸叉敮浠�) + .Sum(x => x.PayAmount) - + lifepayOrderBaseList.Where(x => x.CreationTime >= today.AddDays(-1) && x.LifePayRefundStatus == LifePayRefundStatusEnum.宸查��娆�) + .Sum(x => (x.RefundPrice ?? 0)); + /// 绱鏀跺叆锛氱粺璁″钩鍙拌处鎴蜂笅璁㈠崟鐘舵�佷负鈥滃凡瀹屾垚鈥濅笖璁㈠崟鍒涘缓鏃堕棿鍦ㄦ槰澶╁強涔嬪墠鏀跺埌鐨勩�愮敤鎴峰疄浠橀噾棰�-骞冲彴鎵f閲戦-閮ㄥ垎閫�娆鹃噾棰濄�戯紱 + var accumulatedIncome = lifepayOrderBaseList.Where(x => x.LifePayOrderStatus == LifePayOrderStatusEnum.宸插畬鎴�) + .Sum(x => x.PayAmount - (x.PlatformDeductionAmount ?? 0) - (x.RefundPrice ?? 0)); + /// 鏄ㄦ棩鏀跺叆锛氱粺璁″钩鍙拌处鎴蜂笅璁㈠崟鐘舵�佷负鈥滃凡瀹屾垚鈥濅笖璁㈠崟鍒涘缓鏃堕棿鍦ㄦ槰澶╂敹鍒扮殑銆愮敤鎴峰疄浠橀噾棰�-骞冲彴鎵f閲戦-閮ㄥ垎閫�娆鹃噾棰濄�戯紱 + var yesterdayIncome = lifepayOrderBaseList.Where(x => x.CreationTime >= today.AddDays(-1) && x.LifePayOrderStatus == LifePayOrderStatusEnum.宸插畬鎴�) + .Sum(x => x.PayAmount - (x.PlatformDeductionAmount ?? 0) - (x.RefundPrice ?? 0)); + /// 绱涓嬪崟锛氱粺璁″钩鍙颁腑璁㈠崟涓嬪崟鏃堕棿鍦ㄦ槰澶╁強涔嬪墠鏃堕棿鐨勮鍗曡褰曪紱 + var accumulatedOrders = lifepayOrderBaseList.Count(); + /// 鏄ㄦ棩涓嬪崟锛氱粺璁″钩鍙颁腑璁㈠崟涓嬪崟鏃堕棿鍦ㄦ槰澶╃殑璁㈠崟璁板綍锛� + var ordersNumYesterday = lifepayOrderBaseList.Where(x => x.CreationTime >= today.AddDays(-1)).Count(); + /// 鏄ㄦ棩鎴愬姛锛氱粺璁″钩鍙颁腑璁㈠崟鐘舵�佷负鈥滃凡瀹屾垚/閮ㄥ垎鍏呭�兼垚鍔熲�濅笖璁㈠崟涓嬪崟鏃堕棿鍦ㄦ槰澶╃殑璁㈠崟璁板綍锛� + var yesterdaySuccess = lifepayOrderBaseList.Where(x => x.CreationTime >= today.AddDays(-1) && x.LifePayOrderStatus == LifePayOrderStatusEnum.宸插畬鎴�) + .Count(); + /// 鏄ㄦ棩澶辫触锛氱粺璁″钩鍙颁腑璁㈠崟鐘舵�佷负鈥滃厖鍊煎け璐�/宸查��娆锯�濅笖璁㈠崟涓嬪崟鏃堕棿鍦ㄦ槰澶╃殑璁㈠崟璁板綍锛� + var yesterdayFail = lifepayOrderBaseList.Where(x => x.CreationTime >= today.AddDays(-1) && x.LifePayOrderStatus == LifePayOrderStatusEnum.宸查��娆�) + .Count(); + /// 绱鐢ㄦ埛 + var accumulatedUsers = await _lifePayUserRepository.Where(x => x.CreationTime < today) + .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.CreationChannleNum == channleId).CountAsync(); + /// 鏄ㄦ棩娲昏穬鐢ㄦ埛 + var yesterdayActiveUsers = await (from a in _lifePayUserRepository + join b in _lifePayOrderRepository on a.Id equals b.UserId + where b.CreationTime >= today.AddDays(-1) && b.CreationTime < today + && (b.ACOOLYStatus == ACOOLYStatusEnum.鍏呭�间腑 || b.ACOOLYStatus == ACOOLYStatusEnum.鍏呭�兼垚鍔� || b.ACOOLYStatus == ACOOLYStatusEnum.宸插畬鎴� || b.ACOOLYStatus == ACOOLYStatusEnum.閮ㄥ垎鍏呭�兼垚鍔�) + select b).Distinct().CountAsync(); + /// 绱浣i噾 + var accumulatedChannlesRakePrice = await _lifePayChannlesRakeRepository.Where(x => x.FinishTime < today) + .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.ChannlesRakePrice); var entity = new DallyStatistics() { Id = GuidGenerator.Create(), CreationTime = today, - Amount = accountBalance ?? 0, AccumulatedReceipts = accumulatedReceipts ?? 0, AccumulatedIncome = accumulatedIncome ?? 0, IncomeYesterday = yesterdayIncome ?? 0, @@ -297,6 +349,7 @@ AccumulatedUsers = accumulatedUsers, YesterdayActiveUsers = yesterdayActiveUsers, ChannelId = channleId, + AccumulatedChannlesRakePrice = accumulatedChannlesRakePrice, Date = today.AddDays(-1) }; await _dallyStatisticsRepository.InsertAsync(entity); -- Gitblit v1.9.1