| | |
| | | |
| | | @Override |
| | | public WalletInfoVo walletInfo() { |
| | | // DappMemberEntity member = LoginUserUtil.getAppUser(); |
| | | // DappWalletCoinEntity walletCoin = dappWalletCoinDao.selectByMemberId(member.getId()); |
| | | // DappWalletMineEntity walletMine = dappWalletMineDao.selectByMemberId(member.getId()); |
| | | DappMemberEntity member = LoginUserUtil.getAppUser(); |
| | | |
| | | Map<String, BigDecimal> map = dappFundFlowDao.selectAmountTotalByType(member.getId()); |
| | | WalletInfoVo walletInfo = new WalletInfoVo(); |
| | | // walletInfo.setInviteId(member.getInviteId()); |
| | | // walletInfo.setTotalMine(walletMine.getTotalAmount()); |
| | | // walletInfo.setAvailableMine(walletMine.getAvailableAmount()); |
| | | // walletInfo.setAvailableWallet(walletCoin.getAvailableAmount()); |
| | | List<DappMemberEntity> direct = dappMemberDao.selectChildMemberDirectOrNot(member.getInviteId(), 1); |
| | | List<DappMemberEntity> notDirect = dappMemberDao.selectChildMemberDirectOrNot(member.getInviteId(), 2); |
| | | BigDecimal childHoldAmount = dappMemberDao.selectChildHoldAmount(member.getInviteId()); |
| | | |
| | | walletInfo.setTotalChild(10000); |
| | | walletInfo.setTotalChild(41451); |
| | | walletInfo.setTotalChild(notDirect.size()); |
| | | walletInfo.setDirectCnt(direct.size()); |
| | | walletInfo.setTotalChildCoin(childHoldAmount); |
| | | walletInfo.setTeamReward(map.get("teamReward")); |
| | | walletInfo.setMiningAmount(map.get("mine")); |
| | | walletInfo.setInviteId(member.getInviteId()); |
| | | return walletInfo; |
| | | } |
| | | |
| | |
| | | |
| | | DappMemberEntity member = LoginUserUtil.getAppUser(); |
| | | DappFundFlowEntity dappFundFlowEntity = new DappFundFlowEntity(); |
| | | dappFundFlowEntity.setType(recordInPageDto.getType()); |
| | | if (recordInPageDto.getType() != null && recordInPageDto.getType() != 0) { |
| | | dappFundFlowEntity.setType(recordInPageDto.getType()); |
| | | } |
| | | dappFundFlowEntity.setMemberId(member.getId()); |
| | | IPage<DappFundFlowEntity> records = dappFundFlowDao.selectInPage(page, dappFundFlowEntity); |
| | | return records.getRecords(); |
| | |
| | | public Map<String, BigDecimal> calPrice() { |
| | | DappMemberEntity member = LoginUserUtil.getAppUser(); |
| | | |
| | | |
| | | String hasStart = redisUtils.getString(AppContants.SYSTEM_START_FLAG); |
| | | if (!"start".equals(hasStart)) { |
| | | HashMap<String, BigDecimal> map = new HashMap<>(); |
| | | map.put("x", new BigDecimal("0.073")); |
| | | map.put("y", new BigDecimal("100000")); |
| | | return map; |
| | | } |
| | | |
| | | ContractChainService tfcInstance = ChainService.getInstance(ChainEnum.BSC_TFC.name()); |
| | | // u剩余数量 |
| | | BigDecimal sourceU = ChainService.getInstance(ChainEnum.BSC_USDT.name()).balanceOf(ChainEnum.BSC_USDT_SOURCE.getAddress()); |