| | |
| | | private final ChainProducer chainProducer; |
| | | private final DappSystemDao dappSystemDao; |
| | | private final DbMemberNodeMapper dbMemberNodeMapper; |
| | | private final DappStorageMapper dappStorageMapper; |
| | | |
| | | @Override |
| | | public WalletInfoVo walletInfo() { |
| | |
| | | ); |
| | | BigDecimal withdrawPercent = new BigDecimal(withdrawPercentDic.getValue()); |
| | | walletInfo.setWithdrawPercent(withdrawPercent); |
| | | |
| | | QueryWrapper<DappStorage> objectQueryWrapper = new QueryWrapper<>(); |
| | | objectQueryWrapper.eq("member_id",member.getId()); |
| | | objectQueryWrapper.eq("state",1); |
| | | List<DappStorage> dappStorages = dappStorageMapper.selectList(objectQueryWrapper); |
| | | BigDecimal storageAva = BigDecimal.ZERO; |
| | | if(CollUtil.isNotEmpty(dappStorages)){ |
| | | storageAva = dappStorages.stream().map(DappStorage::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | } |
| | | walletInfo.setStorageAva(storageAva); |
| | | |
| | | BigDecimal staticPerk = dappFundFlowDao.selectSumAmountByMemberIdAndType(member.getId(), MoneyFlowEnum.STATIC_PERK.getValue()); |
| | | walletInfo.setStaticPerk(staticPerk); |
| | | |
| | | BigDecimal runPerk = dappFundFlowDao.selectSumRunPerkByMemberId(member.getId()); |
| | | walletInfo.setRunPerk(runPerk); |
| | | |
| | | return walletInfo; |
| | | } |
| | |
| | | throw new FebsException("存储数量必须是"+bigDecimal+"的整数倍"); |
| | | } |
| | | |
| | | DappStorage dappStorage = dappStorageMapper.selectAmountByAmountDesc(0, 1); |
| | | if(ObjectUtil.isNotEmpty(dappStorage)){ |
| | | if(amount.compareTo(dappStorage.getAmount()) < 0){ |
| | | throw new FebsException("存储数量必须大于:"+dappStorage.getAmount()); |
| | | } |
| | | } |
| | | |
| | | if (ObjectUtil.isEmpty(transferDto.getId())) { |
| | | |
| | | DappFundFlowEntity fundFlow = new DappFundFlowEntity( |