mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-18 04:50:57 +08:00
Merge branch 'main' into codex/fix-finalizelottery-execution-issue
This commit is contained in:
@@ -113,7 +113,7 @@ public class PostService {
|
||||
for (LotteryPost lp : lotteryPostRepository.findByEndTimeAfterAndWinnersIsEmpty(now)) {
|
||||
ScheduledFuture<?> future = taskScheduler.schedule(
|
||||
() -> applicationContext.getBean(PostService.class).finalizeLottery(lp.getId()),
|
||||
java.util.Date.from(java.sql.Timestamp.valueOf(lp.getEndTime()).toInstant()));
|
||||
java.util.Date.from(java.sql.Timestamp.valueOf(lp.getEndTime()).atZone(java.time.ZoneOffset.UTC).toInstant()));
|
||||
scheduledFinalizations.put(lp.getId(), future);
|
||||
}
|
||||
for (LotteryPost lp : lotteryPostRepository.findByEndTimeBeforeAndWinnersIsEmpty(now)) {
|
||||
@@ -213,7 +213,7 @@ public class PostService {
|
||||
if (post instanceof LotteryPost lp && lp.getEndTime() != null) {
|
||||
ScheduledFuture<?> future = taskScheduler.schedule(
|
||||
() -> applicationContext.getBean(PostService.class).finalizeLottery(lp.getId()),
|
||||
java.util.Date.from(java.sql.Timestamp.valueOf(lp.getEndTime()).toInstant()));
|
||||
java.util.Date.from(java.sql.Timestamp.valueOf(lp.getEndTime()).atZone(java.time.ZoneOffset.UTC).toInstant()));
|
||||
scheduledFinalizations.put(lp.getId(), future);
|
||||
}
|
||||
return post;
|
||||
|
||||
Reference in New Issue
Block a user