| src/main/java/cc/mrbird/febs/dapp/service/impl/BscUsdtContractEvent.java | ●●●●● patch | view | raw | blame | history | |
| src/main/resources/application-dev.yml | ●●●●● patch | view | raw | blame | history | |
| src/test/java/cc/mrbird/febs/ChainTest.java | ●●●●● patch | view | raw | blame | history |
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; src/main/resources/application-dev.yml
@@ -16,23 +16,23 @@ # 数据源-1,名称为 base base: # username: db_tfc # password: tfc!@#123 # password: tfc123!@# # driver-class-name: com.mysql.cj.jdbc.Driver # url: jdbc:mysql://154.91.195.155:3306/db_tfc?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8 # url: jdbc:mysql://47.111.90.145:3306/db_tfc?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8 username: ct_test password: 123456 driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://120.27.238.55:3306/db_tfc?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8 redis: # # Redis数据库索引(默认为 0) # Redis数据库索引(默认为 0) # database: 4 # # Redis服务器地址 # host: 154.91.195.155 # host: 47.111.90.145 # # Redis服务器连接端口 # port: 6379 # # Redis 密码 # password: ann123!@# # password: zhongji-mall=-0 database: 9 # Redis服务器地址 host: 120.27.238.55 src/test/java/cc/mrbird/febs/ChainTest.java
@@ -136,6 +136,6 @@ @Test public void chainListener(){ ChainService.contractEventListener(new BigInteger("20767516"), new BigInteger("20767516"), bscUsdtContractEvent, ChainEnum.BSC_USDT.name()); ChainService.contractEventListener(new BigInteger("20767516"), new BigInteger("20767516"), bscUsdtContractEvent, ChainEnum.BSC_USDT_LISTENER.name()); } }