zhengyuxuan
2025-04-01 926d1ff779b1ee9c524bc05d3f161bee6740b2a8
LifePayment/LifePayment.Application/LifePay/StatisticsService.cs
@@ -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.AddDays(-1).ToString("yyyy-MM-dd"),
                    CreationTime = item.FinishTime,
                    Amount = item.ChannlesRakePrice
                };