fix
wzy
2022-08-28 422be47bbda3dbf14a350b119bbf0d0eb3a91c3e
src/main/java/cc/mrbird/febs/dapp/service/impl/BscUsdtContractEvent.java
@@ -187,23 +187,23 @@
                DappFundFlowEntity finalFundFlow = fundFlow;
                DappMemberEntity member = dappMemberService.getById(fundFlow.getMemberId());
                new Thread(() -> {
                int count = finalFundFlow.getAmount().intValue();
                String token = null;
                while (count > 0) {
                    token = ChainService.getInstance(ChainEnum.BSC_NFT_SDC.name()).safeMintNFT(member.getAddress());
                    log.info("激活卡牌:{}", token);
                    try {
                        int count = finalFundFlow.getAmount().intValue();
                        String token = null;
                        while (count > 0) {
                            token = ChainService.getInstance(ChainEnum.BSC_NFT_SDC.name()).safeMintNFT(member.getAddress());
                            Thread.sleep(5000);
                            count--;
                        }
                        finalFundFlow.setStatus(2);
                        finalFundFlow.setToHash(token);
                        dappFundFlowDao.updateById(finalFundFlow);
                    } catch (Exception ex) {
                        Thread.sleep(5000);
                    } catch (InterruptedException ex) {
                        ex.printStackTrace();
                        log.error("发放卡牌错误", ex);
                    }
                }).start();
                    count--;
                }
                finalFundFlow.setStatus(2);
                finalFundFlow.setToHash(token);
                dappFundFlowDao.updateById(finalFundFlow);
                ChainService.getInstance(ChainEnum.BSC_TFC.name()).transfer(AppContants.DESTROY_ADDRESS, finalFundFlow.getTargetAmount());
                return;