KKSU
2024-06-17 676177dc1c4967b30470ee50df6fc30caf396aa9
src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
@@ -378,6 +378,21 @@
        if (buyNode >= Integer.parseInt(buyNodeCodeCntDic.getValue())) {
            throw new FebsException("Do not repeat purchase");
        }
        /**
         * 限购总数200
         */
        DataDictionaryCustom perKNumDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
                DataDictionaryEnum.PERK_NUM.getType(),
                DataDictionaryEnum.PERK_NUM.getCode()
        );
        int perKNum = Integer.parseInt(ObjectUtil.isEmpty(perKNumDic) ? "200" : perKNumDic.getValue());
        List<DappMemberEntity> dappMemberEntities = dappMemberDao.selectList(null);
        int sum1 = dappMemberEntities.stream().mapToInt(DappMemberEntity::getBuyNode).sum();
        if(perKNum < sum1 + 1){
            throw new FebsException("节点已售完");
        }
        if (ObjectUtil.isEmpty(transferDto.getId())) {
            DappFundFlowEntity fundFlow = new DappFundFlowEntity(