xiaoyong931011
2023-08-17 b22a9106fe358c891fe446343a3ccb106674a802
src/main/java/cc/mrbird/febs/dapp/service/impl/AdminOperationServiceImpl.java
@@ -45,6 +45,10 @@
        if(ObjectUtil.isEmpty(memberCoinWithdrawEntity)){
            throw new FebsException("刷新页面重试");
        }
        if (MemberCoinWithdrawEntity.STATUS_DOING != memberCoinWithdrawEntity.getStatus()) {
            throw new FebsException("非可审核状态");
        }
        memberCoinWithdrawEntity.setStatus(MemberCoinWithdrawEntity.STATUS_YES);
        memberCoinWithdrawDao.updateById(memberCoinWithdrawEntity);
@@ -52,7 +56,7 @@
        dappFundFlowEntity.setStatus(DappFundFlowEntity.WITHDRAW_STATUS_AGREE);
        dappFundFlowDao.updateById(dappFundFlowEntity);
        chainProducer.sendFeeDistributeMsg(dappFundFlowEntity.getId());
//        chainProducer.sendFeeDistributeMsg(dappFundFlowEntity.getId());
        return new FebsResponse().success();
    }
@@ -62,6 +66,10 @@
        MemberCoinWithdrawEntity memberCoinWithdrawEntity = memberCoinWithdrawDao.selectById(id);
        if(ObjectUtil.isEmpty(memberCoinWithdrawEntity)){
            throw new FebsException("刷新页面重试");
        }
        if (MemberCoinWithdrawEntity.STATUS_DOING != memberCoinWithdrawEntity.getStatus()) {
            throw new FebsException("非可审核状态");
        }
        DappFundFlowEntity dappFundFlowEntity = dappFundFlowDao.selectById(memberCoinWithdrawEntity.getFlowId());
@@ -77,11 +85,8 @@
        dappWalletService.updateWalletCoinWithLock(memberCoinWithdrawEntity.getAmount(), memberCoinWithdrawEntity.getMemberId(), 1);
        dappWalletService.updateWalletMineWithLock(memberCoinWithdrawEntity.getFeeAmount(), memberCoinWithdrawEntity.getMemberId(), 1);
        DappFundFlowEntity feeFlow = new DappFundFlowEntity(memberCoinWithdrawEntity.getMemberId(), memberCoinWithdrawEntity.getFeeAmount(), 7, 2, null, null);
        DappFundFlowEntity feeFlow = new DappFundFlowEntity();
        dappFundFlowDao.insert(feeFlow);
        DappFundFlowEntity fundFlow = new DappFundFlowEntity(memberCoinWithdrawEntity.getMemberId(), memberCoinWithdrawEntity.getAmount(), 5, 1, memberCoinWithdrawEntity.getFeeAmount(), null);
        dappFundFlowDao.insert(fundFlow);
        return new FebsResponse().success();
    }
}