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