Helius
2022-08-12 5e0c0bacadab898152518437ceb63bf8b54c6652
src/main/java/cc/mrbird/febs/dapp/service/impl/BscUsdtContractEvent.java
@@ -122,6 +122,31 @@
                }
            }
            // 激活卡牌
            if (fundFlow.getType() == 8) {
                DappFundFlowEntity finalFundFlow = fundFlow;
                DappMemberEntity member = dappMemberService.getById(fundFlow.getMemberId());
                new Thread(() -> {
                    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) {
                        ex.printStackTrace();
                        log.error("发放卡牌错误", ex);
                    }
                }).start();
                return;
            }
            OnlineTransferUtil.addTransferRecord(e.from, e.to, amount, e.log.getTransactionHash(), DappTransferRecordEntity.TRANSFER_SOURCE_FLAG_APPLICATION, "USDT");