From 84f97d1b0b2cbf157dea598363e4cfcf8c15348a Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期四, 03 四月 2025 15:52:22 +0800
Subject: [PATCH] fix:佣金统计
---
LifePayment/LifePayment.Application/LifePay/StatisticsService.cs | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs
index fb39436..a4e22f2 100644
--- a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs
@@ -186,12 +186,16 @@
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);
}
--
Gitblit v1.10.0