| | |
| | | public async Task<ChannelDataListOutPut> GetChannelDataList(List<string> channleList) |
| | | { |
| | | int maxStatisticsNumber = 5; |
| | | var statistics = await _lifePayChannlesRakeRepository |
| | | .WhereIf(channleList != null && channleList.Count() > 0, x => channleList.Contains(x.ChannelId)) |
| | | /// 这里不加入.Where()会报错 |
| | | var statistics = await _lifePayChannlesRakeRepository.Where(x => x.IsDeleted == false) |
| | | .WhereIf(channleList.Count() > 0, x => channleList.Contains(x.ChannelId)) |
| | | .ToListAsync(); |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(statistics == null, "渠道收款统计失败"); |
| | | var groupedStatistics = statistics |
| | |
| | | } |
| | | |
| | | /// 累计用户 |
| | | var users = await _lifePayUserRepository.WhereIf(channleList.Count() > 0, x => channleList.Contains(x.CreationChannleNum)) |
| | | var users = await _lifePayUserRepository.Where(x => x.IsDeleted == false).WhereIf(channleList.Count() > 0, x => channleList.Contains(x.CreationChannleNum)) |
| | | .ToListAsync(); |
| | | CheckExtensions.IfTrueThrowUserFriendlyException(statistics == null, "累计用户统计失败"); |
| | | var groupedUsers = users |