| | |
| | | import cc.mrbird.febs.dapp.dto.PriceSettingDto; |
| | | import cc.mrbird.febs.dapp.dto.TeamListDto; |
| | | import cc.mrbird.febs.dapp.entity.*; |
| | | import cc.mrbird.febs.dapp.enumerate.DataDictionaryEnum; |
| | | import cc.mrbird.febs.dapp.mapper.*; |
| | | import cc.mrbird.febs.dapp.service.DappMemberService; |
| | | import cc.mrbird.febs.dapp.vo.AdminSystemFeeVo; |
| | | import cc.mrbird.febs.dapp.vo.TeamListVo; |
| | | import cc.mrbird.febs.system.entity.User; |
| | | import cn.hutool.core.collection.CollUtil; |
| | |
| | | private final RedisUtils redisUtils; |
| | | |
| | | private final DappAchieveMemberTreeDao dappAchieveMemberTreeDao; |
| | | private final DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | throw new FebsException("recommender is not exist"); |
| | | } |
| | | |
| | | List<DappMemberEntity> child = dappMemberDao.selectChildMemberDirectOrNot(connectDto.getInviteId(), 1); |
| | | if (child.size() == 6) { |
| | | throw new FebsException("Invite Code is Invalid"); |
| | | } |
| | | // List<DappMemberEntity> child = dappMemberDao.selectChildMemberDirectOrNot(connectDto.getInviteId(), 1, null); |
| | | // if (child.size() == 6) { |
| | | // throw new FebsException("Invite Code is Invalid"); |
| | | // } |
| | | } else { |
| | | connectDto.setInviteId(null); |
| | | } |
| | |
| | | return buildTeamMatrix(topNode); |
| | | } |
| | | |
| | | @Override |
| | | public void setSystemFee(AdminSystemFeeVo adminSystemFeeVo) { |
| | | String rebatePercent = adminSystemFeeVo.getRebatePercent(); |
| | | DataDictionaryCustom rebateDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.REBATE_PERCENT.getType(), DataDictionaryEnum.REBATE_PERCENT.getCode()); |
| | | rebateDic.setValue(rebatePercent); |
| | | dataDictionaryCustomMapper.updateById(rebateDic); |
| | | |
| | | String serviceFee = adminSystemFeeVo.getServiceFee(); |
| | | DataDictionaryCustom serviceFeeDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.WITHDRAW_SERVICE_FEE.getType(), DataDictionaryEnum.WITHDRAW_SERVICE_FEE.getCode()); |
| | | serviceFeeDic.setValue(serviceFee); |
| | | dataDictionaryCustomMapper.updateById(serviceFeeDic); |
| | | |
| | | String memberFee = adminSystemFeeVo.getMemberFee(); |
| | | DataDictionaryCustom memberFeeDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.MEMBER_FEE.getType(), DataDictionaryEnum.MEMBER_FEE.getCode()); |
| | | memberFeeDic.setValue(memberFee); |
| | | dataDictionaryCustomMapper.updateById(memberFeeDic); |
| | | |
| | | String symbolPrice = adminSystemFeeVo.getSymbolPrice(); |
| | | DataDictionaryCustom symbolPriceDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.SYMBOL_PRICE.getType(), DataDictionaryEnum.SYMBOL_PRICE.getCode()); |
| | | symbolPriceDic.setValue(symbolPrice); |
| | | dataDictionaryCustomMapper.updateById(symbolPriceDic); |
| | | } |
| | | |
| | | public TeamListVo buildTeamMatrix(DappAchieveMemberTreeEntity node) { |
| | | List<DappAchieveMemberTreeEntity> childNodes = dappAchieveMemberTreeDao.selectMatrixChildNode(node.getTopNode(), node.getTreeNode()); |
| | | |