| | |
| | | |
| | | List<BalanceChangeRecord> balanceChangeRecordList = this.baseMapper.selectBalanceChangeRecordList1(balanceChangeRecord); |
| | | List<WalletStatisticsDetail> walletStatisticsDetailList = new ArrayList<>(); |
| | | BigDecimal totalWithdraw = BigDecimal.ZERO; |
| | | for (BalanceChangeRecord changeRecord : balanceChangeRecordList) { |
| | | |
| | | WalletStatisticsDetail walletStatisticsDetail = new WalletStatisticsDetail(); |
| | | BeanUtils.copyBeanProp(walletStatisticsDetail, changeRecord); |
| | | |
| | | BigDecimal beforeAmount = changeRecord.getBeforeAmount(); |
| | | BigDecimal afterAmount = changeRecord.getAfterAmount(); |
| | | |
| | | if (beforeAmount.compareTo(afterAmount) < 0 && changeRecord.getChangeType().equals(2)){ |
| | | BigDecimal changeAmount = changeRecord.getChangeAmount(); |
| | | totalWithdraw = totalWithdraw.add(changeAmount); |
| | | walletStatisticsDetail.setFlag(2); |
| | | }else { |
| | | walletStatisticsDetail.setFlag(1); |
| | | } |
| | | walletStatisticsDetailList.add(walletStatisticsDetail); |
| | | } |
| | | // 按时间排序(倒序) |
| | |
| | | )); |
| | | |
| | | BigDecimal totalRecharge = shopCommissionMap.get(1); |
| | | BigDecimal totalWithdraw = shopCommissionMap.get(2); |
| | | BigDecimal totalShopWithdraw = shopCommissionMap.get(7); |
| | | |
| | | List<WalletStatisticsDetail> walletStatisticsDetailList2 = walletStatisticsDetailList.subList(fromIndex, toIndex); |
| | | for (WalletStatisticsDetail changeRecord : walletStatisticsDetailList2) { |
| | | if (changeRecord.getChangeType().equals(1) || changeRecord.getChangeType().equals(3) || changeRecord.getChangeType().equals(4) || changeRecord.getChangeType().equals(6)) { |
| | | Integer flag = changeRecord.getFlag(); |
| | | if (flag.equals(1)){ |
| | | changeRecord.setChangeAmountString("+¥" + changeRecord.getChangeAmount()); |
| | | } else { |
| | | changeRecord.setChangeAmountString("-¥" + changeRecord.getChangeAmount()); |