| | |
| | | int fromIndex = (int) ((current - 1) * size); |
| | | int toIndex = (int) Math.min(fromIndex + size, walletStatisticsDetailList.size()); |
| | | |
| | | if (fromIndex >= walletStatisticsDetailList.size()) { |
| | | return new WalletStatistics(); |
| | | } |
| | | |
| | | Page<WalletStatisticsDetail> walletStatisticsDetailPage = new Page<>(); |
| | | WalletStatistics walletStatistics = new WalletStatistics(); |
| | | if (fromIndex >= walletStatisticsDetailList.size()) { |
| | | walletStatistics.setPage(walletStatisticsDetailPage); |
| | | return walletStatistics; |
| | | } |
| | | |
| | | Map<Integer, BigDecimal> shopCommissionMap = walletStatisticsDetailList.stream() |
| | | .collect(Collectors.groupingBy( |
| | |
| | | |
| | | List<WalletStatisticsDetail> walletStatisticsDetailList2 = walletStatisticsDetailList.subList(fromIndex, toIndex); |
| | | |
| | | WalletStatistics walletStatistics = new WalletStatistics(); |
| | | Page<WalletStatisticsDetail> walletStatisticsDetailPage = new Page<>(); |
| | | walletStatisticsDetailPage.setCurrent(current); |
| | | walletStatisticsDetailPage.setSize(size); |
| | | walletStatisticsDetailPage.setTotal(walletStatisticsDetailList.size()); |