| | |
| | | Page<AgentFriendRelationEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<AgentFriendRelationEntity> findmemberQuickBuySaleListInPage = agentFriendRelationMapper.findAgentFriendRelationListInPage(page, agentFriendRelationEntity); |
| | | List<AgentFriendRelationEntity> records = findmemberQuickBuySaleListInPage.getRecords(); |
| | | List<AgentFriendRelationEntity> arraylist = new ArrayList<>(); |
| | | if(records != null && records.size() > 0) { |
| | | for(AgentFriendRelationEntity agentFriendRelation : records) { |
| | | String inviteId = agentFriendRelation.getInviteId(); |
| | | if("90457646".equals(inviteId)) { |
| | | //该邀请码下的所有代理 |
| | | Map<String, Object> columnMap = new HashMap<>(); |
| | | columnMap.put("referer_id", "90457646"); |
| | | List<AgentFriendRelationEntity> selectByMap = agentFriendRelationMapper.selectByMap(columnMap); |
| | | |
| | | if(selectByMap != null && selectByMap.size() > 0) { |
| | | int i = 1; |
| | | for(AgentFriendRelationEntity agentFriendRelationEntityTeam : selectByMap){ |
| | | agentFriendRelationEntityTeam.setTeam(i+""); |
| | | arraylist.add(agentFriendRelationEntityTeam); |
| | | String inviteIdTeam = agentFriendRelationEntityTeam.getInviteId(); |
| | | // 当前邀请码下的所有代理MemberID |
| | | List<AgentFriendRelationEntity> lowLevelList = agentFriendRelationMapper.selectAgentFriendRelationByMap(inviteIdTeam); |
| | | if(lowLevelList != null && lowLevelList.size() > 0) { |
| | | for(AgentFriendRelationEntity lowLevelAgentFriendRelationEntity: lowLevelList) { |
| | | lowLevelAgentFriendRelationEntity.setTeam(i+""); |
| | | arraylist.add(lowLevelAgentFriendRelationEntity); |
| | | } |
| | | } |
| | | i++; |
| | | } |
| | | } |
| | | } |
| | | if(arraylist != null && arraylist.size() > 0) { |
| | | for(AgentFriendRelationEntity teamagentFriendRelationEntity : arraylist) { |
| | | if(inviteId.equals(teamagentFriendRelationEntity.getInviteId())) { |
| | | String team = teamagentFriendRelationEntity.getTeam(); |
| | | agentFriendRelation.setTeam(team); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | if(records != null && records.size() > 0) { |
| | | for(AgentFriendRelationEntity agentFriendRelation : records) { |
| | |
| | | // 查询币币钱包 |
| | | MemberWalletCoinEntity walletCoin = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(memberId, symbol); |
| | | |
| | | BigDecimal available = walletCoin.getAvailableBalance().add(selectById.getAmount()).add(selectById.getFeeAmount()); |
| | | BigDecimal available = walletCoin.getAvailableBalance().add(selectById.getAmount()); |
| | | walletCoin.setAvailableBalance(available); |
| | | BigDecimal frozen = walletCoin.getFrozenBalance().subtract(selectById.getAmount()); |
| | | walletCoin.setFrozenBalance(frozen); |
| | |
| | | String closingpriceByMid = memberMapper.selectClosingpriceForBasicRealData(); |
| | | //平仓总手续费 |
| | | String sellClosingpriceByMid = memberMapper.selectSellClosingpriceForBasicRealData(); |
| | | |
| | | //总盈亏 |
| | | String rewardratioByMid = memberMapper.selectRewardratioForBasicRealData(); |
| | | |
| | | //持仓人数 |
| | | String notNullNumber = memberMapper.selectSFCCForBasicRealData(); |
| | | //币币账户不为空的人数 |