| | |
| | | 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( |