2019232
2022-12-14 ad959c3690aea52a0e54e92b001d1959c26c4cc4
src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
@@ -219,6 +219,10 @@
                type = 6;
            }
            if (transferDto.getId() == null) {
                DappFundFlowEntity fundFlowOld = dappFundFlowDao.selectBymemberIdAndType(member.getId(),type);
                if(ObjectUtil.isNotEmpty(fundFlowOld)){
                    throw new FebsException("Do not repeat purchase");
                }
                DappFundFlowEntity fundFlow = new DappFundFlowEntity(member.getId(), transferDto.getAmount(), type, 1, transferDto.getFee(), transferDto.getTxHash());
                dappFundFlowDao.insert(fundFlow);
                return fundFlow.getId();
@@ -227,12 +231,12 @@
            if ("success".equals(transferDto.getFlag())) {
                DappFundFlowEntity flow = dappFundFlowDao.selectById(transferDto.getId());
                if(DappFundFlowEntity.WITHDRAW_STATUS_AGREE == flow.getStatus()){
                    return null;
                    throw new FebsException("Do not repeat purchase");
                }
                //是否已经加入动能
                DappSystemProfit dappSystemProfitIng = dappSystemProfitDao.selectByMemberIdAndState(member.getId(), DappSystemProfit.STATE_IN);
                if(ObjectUtil.isNotEmpty(dappSystemProfitIng)){
                    return null;
                    throw new FebsException("Do not repeat purchase");
                }
                //插入一条会员入列记录,即加入动能队列