xiaoyong931011
2022-12-05 34efa2ca14f6ec35a71b33291a62e53ba691dfb2
src/main/java/cc/mrbird/febs/dapp/service/impl/DappSystemServiceImpl.java
@@ -463,18 +463,19 @@
            return;
        }
        Integer count = dappFundFlowDao.updateStatusById(DappFundFlowEntity.WITHDRAW_STATUS_AGREE,dappFundFlowEntity.getId());
//        if(count > 0){
//        //金额
//        BigDecimal amount = dappFundFlowEntity.getAmount();
//        //目标地址
//        String address = dappMemberEntity.getAddress();
        if(count > 0){
        //金额
        BigDecimal amount = dappFundFlowEntity.getAmount();
        //目标地址
        String address = dappMemberEntity.getAddress();
//        String hash = ChainService.getInstance(ChainEnum.BSC_USDT.name()).transfer(address, amount);
//        if(StrUtil.isEmpty(hash)){
//            return;
//        }
//        dappFundFlowEntity.setToHash(hash);
//        dappFundFlowDao.updateById(dappFundFlowEntity);
//        }
        String hash = ChainService.getInstance(ChainEnum.BNB.name()).transferBaseToken(address, amount);
        if(StrUtil.isEmpty(hash)){
            return;
        }
        dappFundFlowEntity.setToHash(hash);
        dappFundFlowDao.updateById(dappFundFlowEntity);
        }
    }
    @Override