| | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author |
| | |
| | | walletInfo.setDirectCnt(CollUtil.isEmpty(direct) ? 0 : direct.size()); |
| | | walletInfo.setInviteCnt(CollUtil.isEmpty(inviteList) ? 0 : inviteList.size()); |
| | | |
| | | List<DappMemberEntity> collect = dappMemberDao.selectChildMemberDirectOrNot(member.getInviteId(), 2, 1); |
| | | // List<DappMemberEntity> collect = direct.stream().filter(dappMemberEntity -> dappMemberEntity.getActiveStatus() == 1).collect(Collectors.toList()); |
| | | walletInfo.setActiveCnt(CollUtil.isEmpty(collect) ? 0 : collect.size()); |
| | | List<DappMemberEntity> collect = dappMemberDao.selectChildMemberDirectOrNot(member.getInviteId(), 1, 1); |
| | | walletInfo.setActiveDirect(CollUtil.isEmpty(collect) ? 0 : collect.size()); |
| | | List<DappMemberEntity> collectTeam = direct.stream().filter(dappMemberEntity -> dappMemberEntity.getActiveStatus() == 1).collect(Collectors.toList()); |
| | | walletInfo.setActiveCnt(CollUtil.isEmpty(collectTeam) ? 0 : collect.size()); |
| | | // walletInfo.setInviteId(member.getActiveStatus() == 1 ? member.getInviteId() : "-"); |
| | | walletInfo.setInviteId(member.getInviteId()); |
| | | walletInfo.setBalance(walletCoin.getAvailableAmount()); |
| | |
| | | } |
| | | BigDecimal feeUsdt = withdrawCnt.multiply(feePercent).setScale(2, BigDecimal.ROUND_DOWN); |
| | | |
| | | return feeUsdt.divide(priceDto.getAmount(), 2, BigDecimal.ROUND_DOWN); |
| | | return feeUsdt; |
| | | |
| | | // return feeUsdt.divide(priceDto.getAmount(), 2, BigDecimal.ROUND_DOWN); |
| | | } |
| | | |
| | | @Override |
| | |
| | | DappFundFlowEntity feeFlow = new DappFundFlowEntity(member.getId(), withdrawDto.getFee().negate(), 20, 2, null, null); |
| | | dappFundFlowDao.insert(feeFlow); |
| | | |
| | | DappFundFlowEntity fundFlow = new DappFundFlowEntity(member.getId(), withdrawDto.getAmount().negate(), 21, 2, withdrawDto.getFee(), null); |
| | | DappFundFlowEntity fundFlow = new DappFundFlowEntity(member.getId(), withdrawDto.getAmount().negate(), 21, 1, withdrawDto.getFee(), null); |
| | | dappFundFlowDao.insert(fundFlow); |
| | | |
| | | MemberCoinWithdrawEntity memberCoinWithdraw = new MemberCoinWithdrawEntity(); |
| | |
| | | |
| | | @Override |
| | | public FebsResponse agreeWithdraw(Long id) { |
| | | MemberCoinWithdrawEntity memberCoinWithdrawEntity = memberCoinWithdrawDao.selectById(id); |
| | | QueryWrapper<MemberCoinWithdrawEntity> objectQueryWrapper = new QueryWrapper<>(); |
| | | objectQueryWrapper.eq("flow_id",id); |
| | | MemberCoinWithdrawEntity memberCoinWithdrawEntity = memberCoinWithdrawDao.selectOne(objectQueryWrapper); |
| | | // MemberCoinWithdrawEntity memberCoinWithdrawEntity = memberCoinWithdrawDao.selectById(id); |
| | | if(ObjectUtil.isEmpty(memberCoinWithdrawEntity)){ |
| | | throw new FebsException("刷新页面重试"); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public FebsResponse disagreeWithdraw(Long id) { |
| | | MemberCoinWithdrawEntity memberCoinWithdrawEntity = memberCoinWithdrawDao.selectById(id); |
| | | |
| | | QueryWrapper<MemberCoinWithdrawEntity> objectQueryWrapper = new QueryWrapper<>(); |
| | | objectQueryWrapper.eq("flow_id",id); |
| | | MemberCoinWithdrawEntity memberCoinWithdrawEntity = memberCoinWithdrawDao.selectOne(objectQueryWrapper); |
| | | if(ObjectUtil.isEmpty(memberCoinWithdrawEntity)){ |
| | | throw new FebsException("刷新页面重试"); |
| | | } |