This commit is contained in:
parent
b32de0ba2f
commit
de110b66bd
14
pom.xml
14
pom.xml
|
|
@ -98,11 +98,21 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-undertow</artifactId>
|
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-integration</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.integration</groupId>
|
||||||
|
<artifactId>spring-integration-jdbc</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!--<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||||
</dependency>-->
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ import com.microsoft.playwright.options.RequestOptions;
|
||||||
|
|
||||||
import jakarta.annotation.PostConstruct;
|
import jakarta.annotation.PostConstruct;
|
||||||
import jakarta.annotation.PreDestroy;
|
import jakarta.annotation.PreDestroy;
|
||||||
|
import jj.tech.paolu.biz.webadmin.service.G24Service;
|
||||||
import jj.tech.paolu.biz.webadmin.service.Idc9998Sevice;
|
import jj.tech.paolu.biz.webadmin.service.Idc9998Sevice;
|
||||||
import jj.tech.paolu.config.enums.Games;
|
import jj.tech.paolu.config.enums.Games;
|
||||||
import jj.tech.paolu.repository.mybatis.dao.Idc9998AdminInfoMapper;
|
import jj.tech.paolu.repository.mybatis.dao.Idc9998AdminInfoMapper;
|
||||||
|
|
@ -54,6 +55,7 @@ public class Hgt8Component{
|
||||||
|
|
||||||
@Autowired Idc9998Sevice idc9998Sevice;
|
@Autowired Idc9998Sevice idc9998Sevice;
|
||||||
@Autowired Idc9998AdminInfoMapper idc9998AdminInfoMapper;
|
@Autowired Idc9998AdminInfoMapper idc9998AdminInfoMapper;
|
||||||
|
@Autowired G24Service g24Service;
|
||||||
|
|
||||||
@Value("${idc9998.headless}")
|
@Value("${idc9998.headless}")
|
||||||
public void setHeadless(Boolean headless){
|
public void setHeadless(Boolean headless){
|
||||||
|
|
@ -78,8 +80,8 @@ public class Hgt8Component{
|
||||||
.setSlowMo(200)
|
.setSlowMo(200)
|
||||||
);
|
);
|
||||||
|
|
||||||
Idc9998AdminInfo admin = idc9998Sevice.getByUserName("bk7897");
|
// Idc9998AdminInfo admin = idc9998Sevice.getByUserName("bk7897");
|
||||||
this.addInstance(admin.getUser_name());
|
// this.addInstance(admin.getUser_name());
|
||||||
|
|
||||||
logger.info("playwright started");
|
logger.info("playwright started");
|
||||||
}
|
}
|
||||||
|
|
@ -111,6 +113,7 @@ public class Hgt8Component{
|
||||||
inst.admin = bean;
|
inst.admin = bean;
|
||||||
inst.idc9998Sevice = this.idc9998Sevice;
|
inst.idc9998Sevice = this.idc9998Sevice;
|
||||||
inst.idc9998AdminInfoMapper = this.idc9998AdminInfoMapper;
|
inst.idc9998AdminInfoMapper = this.idc9998AdminInfoMapper;
|
||||||
|
inst.g24Service = this.g24Service;
|
||||||
Hgt8Component.instances.put(userName, inst);
|
Hgt8Component.instances.put(userName, inst);
|
||||||
return inst;
|
return inst;
|
||||||
}else {
|
}else {
|
||||||
|
|
@ -174,6 +177,7 @@ public class Hgt8Component{
|
||||||
YMHttp.customApi(Base64.encodeBase64String(image_bytes));
|
YMHttp.customApi(Base64.encodeBase64String(image_bytes));
|
||||||
JsonNode code_num = root.get("data").get("data");
|
JsonNode code_num = root.get("data").get("data");
|
||||||
ifr_main.getByTestId("userName").fill(this.admin.getUser_name());
|
ifr_main.getByTestId("userName").fill(this.admin.getUser_name());
|
||||||
|
this.page.waitForTimeout(1_500);
|
||||||
ifr_main.getByTestId("password").fill(this.admin.getUser_password());
|
ifr_main.getByTestId("password").fill(this.admin.getUser_password());
|
||||||
ifr_main.getByTestId("code").fill(code_num.asText());
|
ifr_main.getByTestId("code").fill(code_num.asText());
|
||||||
this.page.waitForTimeout(5_500); //wait 2500
|
this.page.waitForTimeout(5_500); //wait 2500
|
||||||
|
|
@ -190,41 +194,22 @@ public class Hgt8Component{
|
||||||
ifr_main.getByTestId("tc_Close")
|
ifr_main.getByTestId("tc_Close")
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
this.page.frameLocator("#ifr_main")
|
|
||||||
.locator("xpath=//input[@class='protocol-btn-y']")
|
|
||||||
.click();
|
|
||||||
|
|
||||||
|
|
||||||
|
//及时注单
|
||||||
this.page.frameLocator("#ifr_main")
|
this.page.frameLocator("#ifr_main")
|
||||||
.locator("#jishi-order")
|
.locator("#jishi-order")
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
|
|
||||||
Response s = page.waitForResponse(resp -> {
|
//this.G_24_Curr().join();
|
||||||
System.err.println(resp.url());
|
|
||||||
if(resp.status() == 200 ) {
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
() -> {
|
|
||||||
System.out.println("所有返回相应");
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//更新用户登录状态
|
//更新用户登录状态
|
||||||
String loginInfo = this.aPIRequestContext.storageState();
|
// String loginInfo = this.aPIRequestContext.storageState();
|
||||||
|
|
||||||
// idc9998Sevice.updateLoginInfo(this.admin.getUser_name(), loginInfo, 1);
|
// idc9998Sevice.updateLoginInfo(this.admin.getUser_name(), loginInfo, 1);
|
||||||
// this.admin.setIs_online(1);
|
// this.admin.setIs_online(1);
|
||||||
// this.admin.setLogin_info(loginInfo);
|
// this.admin.setLogin_info(loginInfo);
|
||||||
|
|
||||||
//关闭弹窗
|
|
||||||
//ifr_main.getByTestId("tc_Close")
|
|
||||||
//.click();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
@ -237,34 +222,39 @@ public class Hgt8Component{
|
||||||
|
|
||||||
public CompletableFuture<Response> G_24_Curr() {
|
public CompletableFuture<Response> G_24_Curr() {
|
||||||
CompletableFuture<Response> future = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<Response> future = CompletableFuture.supplyAsync(() -> {
|
||||||
Response response = page.waitForResponse(resp -> {
|
Response response = this.page.waitForResponse(resp ->
|
||||||
System.err.println(resp.url());
|
{
|
||||||
if(resp.status() == 200 ) {
|
//System.err.println(resp.url());
|
||||||
return true;
|
String g24curr_url = this.admin.getDomain()+"/wb2/jd001/m018";
|
||||||
}else {
|
if(resp.status() == 200 && g24curr_url.equals(resp.url())) {
|
||||||
return false;
|
return true;
|
||||||
}
|
}else {
|
||||||
},
|
return false;
|
||||||
() -> {
|
}
|
||||||
System.out.println("所有返回相应");
|
},
|
||||||
}
|
() -> {
|
||||||
|
//System.out.println("所有返回响应");
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
g24Service.getCurretG24Data(response.text());
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
return future.handleAsync((Response re, Throwable ex) -> {
|
return future.handleAsync((Response re, Throwable ex) -> {
|
||||||
if(ex != null) {
|
if(ex != null) {
|
||||||
ex.printStackTrace();
|
logger.error(ex.getMessage());
|
||||||
wrong_times.getAndIncrement();
|
this.wrong_times.getAndIncrement();
|
||||||
if(wrong_times.get()>3) {
|
if(this.wrong_times.get()>3) {
|
||||||
return future;
|
return CompletableFuture.completedFuture(re);
|
||||||
}
|
}
|
||||||
|
|
||||||
return G_24_Curr();
|
return G_24_Curr();
|
||||||
} else {
|
} else {
|
||||||
|
this.wrong_times = new AtomicInteger(0);
|
||||||
return G_24_Curr();
|
return G_24_Curr();
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
.thenCompose(Function.identity());
|
.thenCompose(Function.identity());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,11 @@ package jj.tech.paolu.biz.webadmin.controller;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.concurrent.locks.Lock;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.integration.jdbc.lock.JdbcLockRegistry;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
@ -26,7 +29,7 @@ import jj.tech.paolu.utils.R;
|
||||||
@RequestMapping(value = "/op/idc9998",name = "游戏报告列表")
|
@RequestMapping(value = "/op/idc9998",name = "游戏报告列表")
|
||||||
@Tag(name = "Idc9998Controller", description = "游戏报告列表")
|
@Tag(name = "Idc9998Controller", description = "游戏报告列表")
|
||||||
public class Idc9998Controller {
|
public class Idc9998Controller {
|
||||||
|
@Autowired JdbcLockRegistry jdbcLockRegistry;
|
||||||
|
|
||||||
@Autowired CurrentG24Mapper currentG24Mapper;
|
@Autowired CurrentG24Mapper currentG24Mapper;
|
||||||
@Autowired HistoryG24Mapper historyG24Mapper;
|
@Autowired HistoryG24Mapper historyG24Mapper;
|
||||||
|
|
@ -73,10 +76,25 @@ public class Idc9998Controller {
|
||||||
//// Idc9998AdminInfo admin = idc9998Sevice.getByUserName("bk7897");
|
//// Idc9998AdminInfo admin = idc9998Sevice.getByUserName("bk7897");
|
||||||
// hgt8Component.getInstance("bk7897").login();
|
// hgt8Component.getInstance("bk7897").login();
|
||||||
//
|
//
|
||||||
// return R.FALSE("无法找到该游戏数据");
|
// return R.FALSE("");
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
@Operation(summary = "test lock")
|
||||||
|
@PostMapping("/lock")
|
||||||
|
public Object lock() throws Exception {
|
||||||
|
Lock lock = jdbcLockRegistry.obtain("account-lock");
|
||||||
|
if (lock.tryLock()) {
|
||||||
|
System.out.println("拿到锁");
|
||||||
|
} else {
|
||||||
|
System.out.println("拿不到锁");
|
||||||
|
}
|
||||||
|
return R.FALSE("");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
@ -14,6 +16,7 @@ import com.fasterxml.jackson.databind.JsonMappingException;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
|
import jj.tech.paolu.biz.webadmin.component.Hgt8Component;
|
||||||
import jj.tech.paolu.repository.mybatis.dao.CurrentG24Mapper;
|
import jj.tech.paolu.repository.mybatis.dao.CurrentG24Mapper;
|
||||||
import jj.tech.paolu.repository.mybatis.dao.HistoryG24Mapper;
|
import jj.tech.paolu.repository.mybatis.dao.HistoryG24Mapper;
|
||||||
import jj.tech.paolu.repository.mybatis.dao.support.HistoryG24DynamicSqlSupport;
|
import jj.tech.paolu.repository.mybatis.dao.support.HistoryG24DynamicSqlSupport;
|
||||||
|
|
@ -23,6 +26,7 @@ import jj.tech.paolu.utils.IDHelp;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class G24Service {
|
public class G24Service {
|
||||||
|
private static Logger logger = LoggerFactory.getLogger(G24Service.class);
|
||||||
|
|
||||||
@Autowired CurrentG24Mapper currentG24Mapper;
|
@Autowired CurrentG24Mapper currentG24Mapper;
|
||||||
@Autowired HistoryG24Mapper historyG24Mapper;
|
@Autowired HistoryG24Mapper historyG24Mapper;
|
||||||
|
|
@ -80,6 +84,7 @@ public class G24Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
logger.error(e.getMessage());
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package jj.tech.paolu.config.lock;
|
||||||
|
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.integration.jdbc.lock.DefaultLockRepository;
|
||||||
|
import org.springframework.integration.jdbc.lock.JdbcLockRegistry;
|
||||||
|
import org.springframework.integration.jdbc.lock.LockRepository;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class LockRegistryConfiguration {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public DefaultLockRepository defaultLockRepository(DataSource dataSource){
|
||||||
|
return new DefaultLockRepository(dataSource); //DefaultLockRepository.setTimeToLive(1000 * 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public JdbcLockRegistry jdbcLockRegistry(DefaultLockRepository lockRepository){
|
||||||
|
return new JdbcLockRegistry(lockRepository);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
//package jj.tech.paolu.config.start;
|
|
||||||
//
|
|
||||||
//import org.springframework.context.annotation.Bean;
|
|
||||||
//import org.springframework.context.annotation.Configuration;
|
|
||||||
//
|
|
||||||
//import jj.tech.paolu.biz.webadmin.component.Hgt8Component;
|
|
||||||
//
|
|
||||||
//@Configuration
|
|
||||||
//public class StartCloseConfig {
|
|
||||||
//
|
|
||||||
// @Bean
|
|
||||||
// public Hgt8Component messageProcessor() {
|
|
||||||
// return new Hgt8Component();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
||||||
|
|
@ -1,43 +1,124 @@
|
||||||
//package jj.tech.paolu.task;
|
package jj.tech.paolu.task;
|
||||||
//
|
|
||||||
//import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
//import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
//
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
//import org.slf4j.Logger;
|
import java.util.concurrent.locks.Lock;
|
||||||
//import org.slf4j.LoggerFactory;
|
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
import org.slf4j.Logger;
|
||||||
//import org.springframework.scheduling.annotation.Scheduled;
|
import org.slf4j.LoggerFactory;
|
||||||
//import org.springframework.stereotype.Component;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
//
|
import org.springframework.integration.jdbc.lock.JdbcLockRegistry;
|
||||||
//import jj.tech.paolu.biz.webadmin.component.Hgt8Component;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
//import jj.tech.paolu.biz.webadmin.service.Idc9998Sevice;
|
import org.springframework.stereotype.Component;
|
||||||
//import jj.tech.paolu.repository.mybatis.dao.Idc9998AdminInfoMapper;
|
|
||||||
//import jj.tech.paolu.repository.mybatis.entity.Idc9998AdminInfo;
|
import jj.tech.paolu.biz.webadmin.component.Hgt8Component;
|
||||||
//
|
import jj.tech.paolu.biz.webadmin.service.Idc9998Sevice;
|
||||||
//@Component
|
import jj.tech.paolu.repository.mybatis.dao.Idc9998AdminInfoMapper;
|
||||||
//public class Hgt8Timer {
|
import jj.tech.paolu.repository.mybatis.entity.Idc9998AdminInfo;
|
||||||
// private static Logger logger = LoggerFactory.getLogger(Hgt8Timer.class);
|
|
||||||
//
|
import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat;
|
||||||
// @Autowired Idc9998Sevice idc9998Sevice;
|
|
||||||
// @Autowired Idc9998AdminInfoMapper idc9998AdminInfoMapper;
|
|
||||||
// @Autowired Hgt8Component hgt8Component;
|
@Component
|
||||||
//
|
public class Hgt8Timer {
|
||||||
// @Scheduled(cron = "0/180 * * * * ?")//60s
|
private static Logger logger = LoggerFactory.getLogger(Hgt8Timer.class);
|
||||||
// public void login() {
|
|
||||||
// Idc9998AdminInfo admin =
|
@Autowired Idc9998Sevice idc9998Sevice;
|
||||||
// idc9998Sevice.getByUserName("bk7897");
|
@Autowired Idc9998AdminInfoMapper idc9998AdminInfoMapper;
|
||||||
// if(admin != null && admin.getIs_online() != 1) {
|
@Autowired Hgt8Component hgt8Component;
|
||||||
//
|
|
||||||
// hgt8Component.addInstance(admin.getUser_name())
|
@Autowired JdbcLockRegistry jdbcLockRegistry;
|
||||||
// .forceLogin();
|
|
||||||
//
|
//@Scheduled(cron = "0/180 * * * * ?")//60s
|
||||||
// }else {
|
@Scheduled(fixedDelay = 180) //上一次执行完毕之后,执行的时间间隔
|
||||||
// hgt8Component.addInstance(admin.getUser_name());
|
public void login() {
|
||||||
|
Lock lock = jdbcLockRegistry.obtain("login");
|
||||||
|
if(lock.tryLock()) {
|
||||||
|
Idc9998AdminInfo admin = idc9998Sevice.getByUserName("bk7897");
|
||||||
|
if(admin != null && admin.getIs_online() != 1) {
|
||||||
|
Boolean login_ok =
|
||||||
|
hgt8Component
|
||||||
|
.addInstance(admin.getUser_name())
|
||||||
|
.forceLogin();
|
||||||
|
if(login_ok) {
|
||||||
|
//更新用户登录状态
|
||||||
|
String loginInfo = hgt8Component.addInstance(admin.getUser_name()).aPIRequestContext.storageState();
|
||||||
|
idc9998Sevice.updateLoginInfo(hgt8Component.addInstance(admin.getUser_name()).admin.getUser_name(), loginInfo, 1);
|
||||||
|
hgt8Component.addInstance(admin.getUser_name()).admin.setIs_online(1);
|
||||||
|
hgt8Component.addInstance(admin.getUser_name()).admin.setLogin_info(loginInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
lock.unlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Scheduled(fixedDelay=60)
|
||||||
|
public void isLogin() {
|
||||||
|
Lock lock = jdbcLockRegistry.obtain("login");
|
||||||
|
if(lock.tryLock()) {
|
||||||
|
Hgt8Component bk = hgt8Component.getInstance("bk7897");
|
||||||
|
if(bk!=null && bk.admin!=null) {
|
||||||
|
Boolean isLogin = bk.page.frameLocator("#ifr_main").locator("#jishi-order").isVisible();
|
||||||
|
|
||||||
|
if(!isLogin) {
|
||||||
|
bk.admin.setIs_online(0);
|
||||||
|
idc9998Sevice.updateLoginInfo("bk7897", bk.aPIRequestContext.storageState(), 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
lock.unlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Scheduled(cron = "0/60 * * * * ?")//5秒
|
||||||
|
public void get_g21_curr() {
|
||||||
|
|
||||||
|
Lock lock = jdbcLockRegistry.obtain("get_g21_curr");
|
||||||
|
if(lock.tryLock()) {
|
||||||
|
Hgt8Component bk = hgt8Component.getInstance("bk7897");
|
||||||
|
|
||||||
|
if(bk.admin.getIs_online()==1) {
|
||||||
|
bk.wrong_times=new AtomicInteger(0);
|
||||||
|
bk.G_24_Curr().join();
|
||||||
|
}
|
||||||
|
lock.unlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// //@Scheduled(cron = "0/60 * * * * ?")//5秒
|
||||||
|
// @Scheduled(initialDelay = 1000 * 3, fixedDelay=Long.MAX_VALUE)
|
||||||
|
// public void get_g21_curr() {
|
||||||
|
//
|
||||||
|
// Lock lock = jdbcLockRegistry.obtain("get_g21_curr");
|
||||||
|
// if(lock.tryLock()) {
|
||||||
|
// Hgt8Component bk = hgt8Component.getInstance("bk7897");
|
||||||
|
// if(bk==null || bk.admin==null) {
|
||||||
|
// idc9998Sevice.updateIsOnline("bk7897", 0);
|
||||||
|
// lock.unlock();
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// if(bk.admin.getIs_online()==1) {
|
||||||
|
// //bk.wrong_times=new AtomicInteger(0);
|
||||||
|
// bk.G_24_Curr().join();
|
||||||
|
//
|
||||||
|
//// bk.admin.setIs_online(0);
|
||||||
|
//// idc9998Sevice.updateIsOnline("bk7897", 0);
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// lock.unlock();
|
||||||
// }
|
// }
|
||||||
|
//
|
||||||
// }
|
// }
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
// @Scheduled(cron = "0/20 * * * * ?")//5秒
|
// @Scheduled(cron = "0/20 * * * * ?")//5秒
|
||||||
// public void get_g21() {
|
// public void get_g21_his() {
|
||||||
// try {
|
// try {
|
||||||
//
|
//
|
||||||
// Hgt8Component bk = hgt8Component.getInstance("bk7897");
|
// Hgt8Component bk = hgt8Component.getInstance("bk7897");
|
||||||
|
|
@ -52,7 +133,7 @@
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,8 @@ logging:
|
||||||
root: info
|
root: info
|
||||||
org.jooq: info
|
org.jooq: info
|
||||||
org.springframework.amqp: info
|
org.springframework.amqp: info
|
||||||
|
org.springframework.integration: debug
|
||||||
org.mybatis: debug
|
org.mybatis: debug
|
||||||
org.mybatis.dynamic.sql: debug
|
org.mybatis.dynamic.sql: debug
|
||||||
jj.tech.paolu: debug
|
jj.tech.paolu: debug
|
||||||
|
|
||||||
|
|
@ -181,3 +181,13 @@ create table history_g24 (
|
||||||
unique (newIssue)
|
unique (newIssue)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
drop table if exists INT_LOCK;
|
||||||
|
CREATE TABLE INT_LOCK (
|
||||||
|
LOCK_KEY CHAR(36) NOT NULL,
|
||||||
|
REGION VARCHAR(100) NOT NULL,
|
||||||
|
CLIENT_ID CHAR(36),
|
||||||
|
CREATED_DATE DATETIME(6) NOT NULL,
|
||||||
|
constraint INT_LOCK_PK primary key (LOCK_KEY, REGION)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user