From 5f6f3e8e5fc2a3378f27ac244d62c97746bafc2a Mon Sep 17 00:00:00 2001
From: zhengyuxuan <zhengyuxuan1995>
Date: 星期一, 24 三月 2025 10:21:18 +0800
Subject: [PATCH] fix:统计bug修复

---
 LifePayment/LifePayment.Application/LifePay/StatisticsService.cs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs
index 670e2e3..5bcd101 100644
--- a/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/StatisticsService.cs
@@ -49,7 +49,7 @@
                 var yesterdaySuccess = await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.LifePayOrderStatus == LifePayOrderStatusEnum.宸插畬鎴�).CountAsync();
                 var yesterdayFail = await _lifePayOrderRepository.Where(x => x.CreationTime >= today.AddDays(-1) && x.CreationTime < today && x.LifePayOrderStatus == LifePayOrderStatusEnum.閫�娆惧け璐�).CountAsync();
                 var accumulatedUsers = await _lifePayUserRepository.CountAsync();
-
+                var yesterdayActiveUsers = await _lifePayUserRepository.Where(x => x.LastLoginTime >= today.AddDays(-1)).CountAsync();
                 var entity = new DallyStatistics()
                 {
                     Id = GuidGenerator.Create(),
@@ -62,6 +62,7 @@
                     YesterdaySuccess = yesterdaySuccess,
                     YesterdayFail = yesterdayFail,
                     AccumulatedUsers = accumulatedUsers,
+                    YesterdayActiveUsers = yesterdayActiveUsers
                 };
                 await _dallyStatisticsRepository.InsertAsync(entity);
 
@@ -75,6 +76,7 @@
                     YesterdaySuccess = entity.YesterdaySuccess,
                     YesterdayFail = entity.YesterdayFail,
                     AccumulatedUsers = entity.AccumulatedUsers,
+                    YesterdayActiveUsers = yesterdayActiveUsers
                 };
                 return topStatisticsOutput;
             }

--
Gitblit v1.9.1