xiaoyong931011
2022-12-01 a4a3aa33e8250eec1789a2f18e795fd891499881
src/main/java/cc/mrbird/febs/dapp/service/impl/DappSystemServiceImpl.java
@@ -457,20 +457,20 @@
        if(DappFundFlowEntity.WITHDRAW_STATUS_AGREE == dappFundFlowEntity.getStatus()){
            return;
        }
        //金额
        BigDecimal amount = dappFundFlowEntity.getAmount();
        Long memberId = dappFundFlowEntity.getMemberId();
        DappMemberEntity dappMemberEntity = dappMemberDao.selectById(memberId);
        if(ObjectUtil.isEmpty(dappMemberEntity)){
            return;
        }
        //目标地址
        String address = dappMemberEntity.getAddress();
        String hash = ChainService.getInstance(ChainEnum.BSC_USDT.name()).transfer(address, amount);
        if(StrUtil.isEmpty(hash)){
            return;
        }
        dappFundFlowEntity.setToHash(hash);
//        //金额
//        BigDecimal amount = dappFundFlowEntity.getAmount();
//        Long memberId = dappFundFlowEntity.getMemberId();
//        DappMemberEntity dappMemberEntity = dappMemberDao.selectById(memberId);
//        if(ObjectUtil.isEmpty(dappMemberEntity)){
//            return;
//        }
//        //目标地址
//        String address = dappMemberEntity.getAddress();
//        String hash = ChainService.getInstance(ChainEnum.BSC_USDT.name()).transfer(address, amount);
//        if(StrUtil.isEmpty(hash)){
//            return;
//        }
//        dappFundFlowEntity.setToHash(hash);
        dappFundFlowEntity.setStatus(DappFundFlowEntity.WITHDRAW_STATUS_AGREE);
        dappFundFlowDao.updateById(dappFundFlowEntity);