인게임 메시지 스케줄 처리 수정

This commit is contained in:
2025-11-24 17:43:27 +09:00
parent 81ce45f18f
commit 7769c32dd7

View File

@@ -149,6 +149,7 @@ public class NoticeScheduler extends CommonScheduler {
if(now_date.isAfter(start_date)) {
LocalTime now_time = LocalTime.now();
LocalTime repeat_time = CommonUtils.stringToTime(notice.getRepeatDt());
LocalTime repeat_time_utc = repeat_time.minusHours(9);
LocalDateTime end_date = notice.getEndDt();
InGame.SENDSTATUS status = notice.getSendStatus();
Long id = notice.getId();
@@ -157,18 +158,22 @@ public class NoticeScheduler extends CommonScheduler {
if(status.equals(InGame.SENDSTATUS.WAIT)) noticeService.updateNoticeStatus(id, InGame.SENDSTATUS.RUNNING);
if (now_time.equals(repeat_time)) {
if (now_time.getHour() == repeat_time_utc.getHour() &&
now_time.getMinute() == repeat_time_utc.getMinute()
) {
log.info("noticeJob noticeSchedule RepeatType: Time run : {}", notice);
boolean is_send = noticeSend(notice);
if (!is_send) {
log.error("Notice Schedule Fail RepeatType: Time, id: {}", id);
return;
}
noticeService.updateNoticeCount(id);
if(status.equals(InGame.SENDSTATUS.RUNNING) && (now_date.isBefore(end_date) || now_date.isEqual(end_date))){
noticeService.updateNoticeStatus(id, InGame.SENDSTATUS.FINISH);
log.info("Notice Schedule End RepeatType: Time, id: {}", id);
}
}
if(status.equals(InGame.SENDSTATUS.RUNNING) && (now_date.isBefore(end_date) || now_date.isEqual(end_date))){
noticeService.updateNoticeStatus(id, InGame.SENDSTATUS.FINISH);
log.info("Notice Schedule End RepeatType: Time, id: {}", id);
}
}
}
}