xiaoyong931011
2022-12-05 7937f55073f71231d4983c2f3a07ee9c9c38fe0e
src/main/java/cc/mrbird/febs/dapp/service/impl/DappSystemServiceImpl.java
@@ -463,19 +463,20 @@
            return;
        }
        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);
        }
//        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;
            }
            log.info("{},{}",id,hash);
            dappFundFlowEntity.setFromHash(hash);
            dappFundFlowDao.updateById(dappFundFlowEntity);
//        }
    }
    @Override