zhengyuxuan
2025-04-02 e7d1ef3eef4dcbec4f7fae27542e94cc0bbf89c8
LifePayment/LifePayment.Application/LifePay/StatisticsService.cs
@@ -85,9 +85,9 @@
                if (channleList.Count() == 0)
                {
                    /// 账户余额
                    var accountBalance = totalRechargeReceipts - await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.PayStatus == LifePayStatusEnum.已支付
                    var accountBalance = totalRechargeReceipts - await _lifePayOrderRepository.Where(x => x.PayStatus == LifePayStatusEnum.已支付
                    && (x.ACOOLYStatus == ACOOLYStatusEnum.充值成功 || x.ACOOLYStatus == ACOOLYStatusEnum.已完成 || x.ACOOLYStatus == ACOOLYStatusEnum.部分充值成功))
                      .SumAsync(x => x.PayAmount);
                      .SumAsync(x => x.PlatformDeductionAmount);
                    topStatisticsOutput.Amount = accountBalance ?? 0;
                }
@@ -112,12 +112,12 @@
                if (channleList.Count() == 0)
                {
                    /// 账户余额
                    var accountBalance = totalRechargeReceipts - await _lifePayOrderRepository.Where(x => x.CreationTime < today && x.PayStatus == LifePayStatusEnum.已支付
                    var accountBalance = totalRechargeReceipts - await _lifePayOrderRepository.Where(x => x.PayStatus == LifePayStatusEnum.已支付
                    && (x.ACOOLYStatus == ACOOLYStatusEnum.充值成功 || x.ACOOLYStatus == ACOOLYStatusEnum.已完成 || x.ACOOLYStatus == ACOOLYStatusEnum.部分充值成功))
                      .SumAsync(x => x.PayAmount);
                      .SumAsync(x => x.PlatformDeductionAmount);
                    topStatisticsOutput.Amount = accountBalance ?? 0;
                }
                return topStatisticsOutput;
            }
        }
@@ -315,7 +315,7 @@
            /// 累计用户
            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 yesterdayActiveUsers = await _lifePayUserRepository.Where(x => x.IsDeleted == false).WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.CreationChannleNum == channleId).Where(x => x.LastLoginTime >= today.AddDays(-1) && x.LastLoginTime < today).CountAsync();
            var accumulatedChannlesRakePrice = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false && x.FinishTime < today)
                .WhereIf(!string.IsNullOrWhiteSpace(channleId), x => x.ChannelId == channleId).SumAsync(x => x.ChannlesRakePrice);