Skip to content

Commit

Permalink
Fixed issue where created_at was not being saved (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinlee1703 authored Sep 19, 2023
2 parents 978324d + 0330a6c commit a9dfa7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public Notification save(Member member, Voucher voucher, NotificationType type,
.type(type)
.message(message)
.voucher(voucher)
.createdAt(LocalDateTime.now())
.build();
return notificationRepository.save(notification);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class ScheduledTasks {
private final DeviceTokenService deviceTokenService;
private final FCMNotificationService fcmNotificationService;

@Scheduled(cron = "0 35 10 * * ?", zone = "Asia/Seoul") // 매일 오전 10시 실행
@Scheduled(cron = "0 0 10 * * ?", zone = "Asia/Seoul") // 매일 오전 10시 실행
public void sendExpirationNotification() {
LocalDate today = LocalDate.now();
List<Voucher> expiringVoucherList = voucherService.list().stream().filter(voucher -> {
Expand Down Expand Up @@ -51,7 +51,7 @@ public void sendExpirationNotification() {
}
}

@Scheduled(cron = "0 0 10 * * ?", zone = "Asia/Seoul") // 매일 오전 9시 실행
@Scheduled(cron = "0 0 9 * * ?", zone = "Asia/Seoul") // 매일 오전 9시 실행
public void deleteDeviceToken() {
LocalDateTime now = LocalDateTime.now();

Expand Down

0 comments on commit a9dfa7b

Please sign in to comment.