| | |
| | | |
| | | List<DappMemberFund> dappMemberFunds = dappMemberFundMapper.selectList(null); |
| | | walletInfo.setCcTotal(CollUtil.isEmpty(dappMemberFunds) ? BigDecimal.ZERO : |
| | | dappMemberFunds.stream().map(item-> item.getAmount()).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(8,BigDecimal.ROUND_DOWN)); |
| | | dappMemberFunds.stream().map(DappMemberFund::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(8,BigDecimal.ROUND_DOWN)); |
| | | |
| | | List<DappAchieve> dappAchieves = dappAchieveMapper.selectListByMemberId(memberId); |
| | | |
| | | BigDecimal goldAmountDone = dappAchieveMapper.selectGoldAmountByMemberId(memberId); |
| | | BigDecimal coinAmountDone = dappAchieveMapper.selectCoinAmountByMemberId(memberId); |
| | | if(CollUtil.isNotEmpty(dappAchieves)){ |
| | | BigDecimal goldAmount = dappAchieves.stream().map(item-> item.getGoldAmount()).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(8,BigDecimal.ROUND_DOWN); |
| | | BigDecimal coinAmount = dappAchieves.stream().map(item-> item.getCoinAmount()).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(8,BigDecimal.ROUND_DOWN); |
| | | BigDecimal goldAmount = dappAchieves.stream().map(DappAchieve::getGoldAmount).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(8,BigDecimal.ROUND_DOWN); |
| | | BigDecimal coinAmount = dappAchieves.stream().map(DappAchieve::getCoinAmount).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(8,BigDecimal.ROUND_DOWN); |
| | | BigDecimal goldAmountAva = goldAmount.subtract(goldAmountDone);//金本位剩余 |
| | | BigDecimal coinAmountAva = coinAmount.subtract(coinAmountDone);//币本位剩余 |
| | | if(goldAmountAva.compareTo(BigDecimal.ZERO) > 0){ |