xiaoyong931011
2022-11-08 a64d6284082665f9a27add91edc0f7dc7e31afb7
src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
@@ -206,18 +206,18 @@
        DappFundFlowEntity feeFlow = new DappFundFlowEntity(member.getId(), withdrawDto.getFee().negate(), 7, 2, null, null);
        dappFundFlowDao.insert(feeFlow);
        DappFundFlowEntity fundFlow = new DappFundFlowEntity(member.getId(), withdrawDto.getAmount().negate(), 5, 2, withdrawDto.getFee(), null);
        DappFundFlowEntity fundFlow = new DappFundFlowEntity(member.getId(), withdrawDto.getAmount().negate(), 5, 1, withdrawDto.getFee(), null);
        dappFundFlowDao.insert(fundFlow);
        String hash = ChainService.getInstance(ChainEnum.BSC_USDT.name()).transfer(member.getAddress(), withdrawDto.getAmount());
        fundFlow.setToHash(hash);
        dappFundFlowDao.updateById(fundFlow);
//        String hash = ChainService.getInstance(ChainEnum.BSC_USDT.name()).transfer(member.getAddress(), withdrawDto.getAmount());
//        fundFlow.setToHash(hash);
//        dappFundFlowDao.updateById(fundFlow);
        Map<String, Object> map = new HashMap<>();
        map.put("fee", withdrawDto.getFee());
        map.put("address", ChainEnum.BSC_TFC_FEE.getAddress());
        map.put("flow", feeFlow.getId());
        chainProducer.sendTfcFee(JSONObject.toJSONString(map));
//        Map<String, Object> map = new HashMap<>();
//        map.put("fee", withdrawDto.getFee());
//        map.put("address", ChainEnum.BSC_TFC_FEE.getAddress());
//        map.put("flow", feeFlow.getId());
//        chainProducer.sendTfcFee(JSONObject.toJSONString(map));
    }
    @Override