From 8c1dce43d197565302ead9d3ae78dff8ea4f9687 Mon Sep 17 00:00:00 2001 From: zhengyuxuan <zhengyuxuan1995> Date: 星期三, 02 四月 2025 06:05:21 +0800 Subject: [PATCH] fix:bug修复 --- LifePayment/LifePayment.Application/LifePay/StatisticsService.cs | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs index 4b9a3c5..b69b5b6 100644 --- a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs +++ b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs @@ -125,12 +125,12 @@ { ReceiptsDetail receive = new ReceiptsDetail() { - CreationTime = item.CreationTime.ToString("yyyy-MM-dd"), + CreationTime = item.CreationTime.AddDays(-1).ToString("yyyy-MM-dd"), Amount = item.TotalReceiptsYesterday }; ReceiptsDetail income = new ReceiptsDetail() { - CreationTime = item.CreationTime.ToString("yyyy-MM-dd"), + CreationTime = item.CreationTime.AddDays(-1).ToString("yyyy-MM-dd"), Amount = item.TotalIncomeYesterday }; receiptsListOutPut.ReceiveList.Add(receive); @@ -143,18 +143,18 @@ public async Task<ChannlesRakeListOutPut> GetChannlesRakeList(List<string> channleList) { var today = DateTime.Now.Date; - var statistics = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false) + var statistics = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false && + x.FinishTime.Date <= today && x.FinishTime.Date >= today.AddDays(-30)) .WhereIf(channleList.Count() > 0, x => channleList.Contains(x.ChannelId)) .ToListAsync(); var groupedStatistics = statistics - .GroupBy(x => x.CreationTime) + .GroupBy(x => x.FinishTime.ToString("yyyy-MM-dd")) .Select(g => new { - CreationTime = g.Key, + FinishTime = g.Key, ChannlesRakePrice = g.Sum(x => x.ChannlesRakePrice), }) .ToList(); - ChannlesRakeListOutPut channlesRakeListOutPut = new ChannlesRakeListOutPut(); @@ -162,7 +162,7 @@ { ReceiptsDetail receive = new ReceiptsDetail() { - CreationTime = item.CreationTime.ToString("yyyy-MM-dd"), + CreationTime = item.FinishTime, Amount = item.ChannlesRakePrice }; -- Gitblit v1.9.1