bug
All checks were successful
/ build-image (push) Successful in 2m0s

This commit is contained in:
mmm8955405 2024-10-01 16:47:10 +08:00
parent de110b66bd
commit f21546a669
2 changed files with 8 additions and 5 deletions

View File

@ -5,6 +5,7 @@ import static org.mybatis.dynamic.sql.SqlBuilder.*;
import java.time.LocalDateTime;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -44,6 +45,10 @@ public class G24Service {
Integer openTime = root.get("openTime").asInt();
Integer closeTime = root.get("closeTime").asInt();
if(StringUtils.isBlank(ball)) {
return;
}
HistoryG24 his =
historyG24Mapper.selectOne(s->s
.where()
@ -65,7 +70,6 @@ public class G24Service {
currentG24.setOpenTime(openTime);
currentG24.setCloseTime(closeTime);
currentG24.setAddTime(now);
currentG24.setBall(ball);
currentG24.setGameID(gameID);
currentG24Mapper.insertSelective(currentG24);
@ -77,7 +81,6 @@ public class G24Service {
historyG24.setOpenTime(openTime);
historyG24.setCloseTime(closeTime);
historyG24.setAddTime(now);
historyG24.setBall(ball);
historyG24.setGameID(gameID);
historyG24Mapper.insert(historyG24);

View File

@ -31,7 +31,7 @@ public class Hgt8Timer {
@Autowired JdbcLockRegistry jdbcLockRegistry;
//@Scheduled(cron = "0/180 * * * * ?")//60s
@Scheduled(fixedDelay = 180) //上一次执行完毕之后,执行的时间间隔
@Scheduled(fixedDelay = 1000 * 180) //上一次执行完毕之后,执行的时间间隔
public void login() {
Lock lock = jdbcLockRegistry.obtain("login");
if(lock.tryLock()) {
@ -56,7 +56,7 @@ public class Hgt8Timer {
}
@Scheduled(fixedDelay=60)
@Scheduled(fixedDelay = 1000 * 60)
public void isLogin() {
Lock lock = jdbcLockRegistry.obtain("login");
if(lock.tryLock()) {
@ -81,7 +81,7 @@ public class Hgt8Timer {
if(lock.tryLock()) {
Hgt8Component bk = hgt8Component.getInstance("bk7897");
if(bk.admin.getIs_online()==1) {
if(bk!=null && bk.admin!=null && bk.admin.getIs_online()==1) {
bk.wrong_times=new AtomicInteger(0);
bk.G_24_Curr().join();
}