| | |
| | | ); |
| | | BigDecimal buyNodeAmount = new BigDecimal(StrUtil.isEmpty(buyNodeAmountDic.getValue()) ? "100" : buyNodeAmountDic.getValue()); |
| | | walletInfo.setBuyNodeAmount(buyNodeAmount); |
| | | |
| | | DataDictionaryCustom buyNodeCodeCntDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.BUY_NODE_CNT.getType(), |
| | | DataDictionaryEnum.BUY_NODE_CNT.getCode() |
| | | ); |
| | | BigDecimal buyNodeCodeCnt = new BigDecimal(StrUtil.isEmpty(buyNodeCodeCntDic.getValue()) ? "3" : buyNodeCodeCntDic.getValue()); |
| | | walletInfo.setBuyNodeCnt(buyNodeCodeCnt); |
| | | walletInfo.setBuyNode(ObjectUtil.isEmpty(memberInfo.getBuyNode()) ? 0 : memberInfo.getBuyNode()); |
| | | |
| | | BigDecimal bigDecimal = dappFundFlowDao.selectSumAmountByMemberIdAndType(member.getId(), 14); |
| | | walletInfo.setBuyNodePerk(bigDecimal); |
| | | return walletInfo; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | member = dappMemberDao.selectById(member.getId()); |
| | | int buyNode = ObjectUtil.isEmpty(member.getBuyNode()) ? 0 : 1; |
| | | if (1 == buyNode) { |
| | | // int buyNode = ObjectUtil.isEmpty(member.getBuyNode()) ? 0 : 1; |
| | | int buyNode = member.getBuyNode(); |
| | | DataDictionaryCustom buyNodeCodeCntDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.BUY_NODE_CNT.getType(), |
| | | DataDictionaryEnum.BUY_NODE_CNT.getCode() |
| | | ); |
| | | if (buyNode >= Integer.parseInt(buyNodeCodeCntDic.getValue())) { |
| | | throw new FebsException("Do not repeat purchase"); |
| | | } |
| | | |
| | |
| | | return null; |
| | | } |
| | | if ("success".equals(transferDto.getFlag())) { |
| | | flow.setStatus(2); |
| | | flow.setFromHash(transferDto.getTxHash()); |
| | | dappFundFlowDao.updateById(flow); |
| | | member.setBuyNode(1); |
| | | dappMemberDao.updateById(member); |
| | | |
| | | } else { |
| | | if (flow.getStatus() == 1) { |