|
|
@@ -57,16 +57,18 @@ public class TournamentTask {
|
|
|
List<PhysicalTournamentRuntimeVo> physicalTournamentRuntimeVoList = physicalTournamentRuntimeMapper.selectPhysicalTournamentRuntimeAllList("WAITING");
|
|
|
for (PhysicalTournamentRuntimeVo runtime : physicalTournamentRuntimeVoList) {
|
|
|
PhysicalTournamentsVo tournament = tournamentsMapper.selectPhysicalTournamentsByIdInfo(runtime.getTournamentId());
|
|
|
- //校验状态是否是未开始的 防止重复进入
|
|
|
-
|
|
|
- // 检查是否到达开始时间
|
|
|
+ if (tournament == null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ //校验状态是否是未开始的 防止重复进入 // 检查是否到达开始时间
|
|
|
// 获取 startTime 并转换为 LocalDateTime
|
|
|
LocalDateTime startTime = tournament.getStartTime().toInstant()
|
|
|
.atZone(java.time.ZoneId.systemDefault())
|
|
|
.toLocalDateTime();
|
|
|
- // 比较时间 当前比赛时间是 十一点开始 十一点十分在来跑到这个job 比赛则不能开始了
|
|
|
- if (startTime.equals(LocalDateTime.now().withSecond(0).withNano(0))) {
|
|
|
- //操作级别历史记录
|
|
|
+ LocalDateTime currentTime = LocalDateTime.now();
|
|
|
+ LocalDateTime currentRounded = currentTime.withSecond(0).withNano(0);
|
|
|
+ LocalDateTime startRounded = startTime.withSecond(0).withNano(0);
|
|
|
+ if (startRounded.equals(currentRounded)) { //操作级别历史记录
|
|
|
PhysicalTournamentLevelHistory history=new PhysicalTournamentLevelHistory();
|
|
|
TournamentBlindStructuresVo tournamentBlindStructuresVo = physicalTournamentBlindStructuresMapper.selectPhysicalTournamentBlindStructureByTournamentId(tournament.getId());
|
|
|
PhysicalTournamentRuntime physicalTournamentRuntime=new PhysicalTournamentRuntime();
|