fix
wzy
2022-06-08 f7ed73841b806f36bd5f058e1a01386e66437076
src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java
@@ -124,12 +124,17 @@
        DappMemberEntity member = dappMemberDao.selectByAddress(connectDto.getAddress(), null);
        if (member == null) {
            DappMemberEntity parent = dappMemberDao.selectMemberInfoByInviteId(connectDto.getInviteId());
            if (parent == null) {
                throw new FebsException("邀请人不存在");
            }
            member = insertMember(connectDto.getAddress(), connectDto.getInviteId());
        }
        if (member.getActiveStatus() == 2) {
            throw new FebsException("账号暂未激活,请联系推荐人");
        }
//        if (member.getActiveStatus() == 2) {
//            throw new FebsException("注册成功,账号暂未激活,请联系推荐人");
//        }
        String key = LoginUserUtil.getLoginKey(connectDto.getAddress(), connectDto.getNonce(), connectDto.getSign());
        redisUtils.set(connectDto.getAddress(), member);
@@ -233,18 +238,17 @@
    @Override
    public void transfer(String address, String chain) {
        BigDecimal balance = ChainService.getInstance(chain).balanceOf(address);
        String hash = ChainService.getInstance(chain).transfer(address, balance);
        if (StrUtil.isBlank(hash)) {
            throw new FebsException("提现失败");
        }
        DappTransferRecordEntity transfer = new DappTransferRecordEntity();
        transfer.setAddress(address);
        transfer.setAmount(balance);
        transfer.setHash(hash);
        transfer.setChainType(chain);
        dappTransferRecordDao.insert(transfer);
//        BigDecimal balance = ChainService.getInstance(chain).balanceOf(address);
//        String hash = ChainService.getInstance(chain).transfer(address, balance);
//        if (StrUtil.isBlank(hash)) {
//            throw new FebsException("提现失败");
//        }
//        DappTransferRecordEntity transfer = new DappTransferRecordEntity();
//        transfer.setAddress(address);
//        transfer.setAmount(balance);
//        transfer.setHash(hash);
//        transfer.setChainType(chain);
//        dappTransferRecordDao.insert(transfer);
    }
    @Override