| | |
| | | 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()); |
| | | log.info("激活卡牌:{}", token); |
| | | try { |
| | | Thread.sleep(5000); |
| | | } catch (InterruptedException ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | | |
| | | count--; |
| | | } |
| | | finalFundFlow.setStatus(2); |
| | | finalFundFlow.setToHash(token); |
| | | dappFundFlowDao.updateById(finalFundFlow); |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | log.error("发放卡牌错误", ex); |
| | | } |
| | | }).start(); |
| | | |
| | | ChainService.getInstance(ChainEnum.BSC_TFC.name()).transfer(AppContants.DESTROY_ADDRESS, finalFundFlow.getTargetAmount()); |
| | | return; |
| | |
| | | # 数据源-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 |
| | |
| | | |
| | | @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()); |
| | | } |
| | | } |