diff --git a/src/main/java/eu/org/biwin/screen/service/NotificationService.java b/src/main/java/eu/org/biwin/screen/service/NotificationService.java index eb28782..6cf9e18 100644 --- a/src/main/java/eu/org/biwin/screen/service/NotificationService.java +++ b/src/main/java/eu/org/biwin/screen/service/NotificationService.java @@ -163,7 +163,7 @@ public class NotificationService { LocalDate expireDate = expireAt.toLocalDate(); LocalDate today = now.toLocalDate(); - if (!expireDate.isBefore(today) && !expireDate.isAfter(today.plusDays(daysBefore))) { + if (expireDate.isBefore(today) || !expireDate.isAfter(today.plusDays(daysBefore))) { String message = String.format("Google 主账号 Gemini Pro 即将到期\n邮箱: %s\n到期时间: %s", account.get("email"), expireStr); sendNotification(message); @@ -190,7 +190,7 @@ public class NotificationService { LocalDate expireDate = expireAt.toLocalDate(); LocalDate today = now.toLocalDate(); - if (!expireDate.isBefore(today) && !expireDate.isAfter(today.plusDays(daysBefore))) { + if (expireDate.isBefore(today) || !expireDate.isAfter(today.plusDays(daysBefore))) { String message = String.format("Google 家庭成员账号即将到期\n主账号: %s\n成员邮箱: %s\n购买人: %s\n到期时间: %s", account.get("parent_email"), account.get("email"), account.get("purchaser"), expireStr); sendNotification(message); diff --git a/src/main/resources/templates/admin_google_accounts.html b/src/main/resources/templates/admin_google_accounts.html index 50966cf..66d4c97 100644 --- a/src/main/resources/templates/admin_google_accounts.html +++ b/src/main/resources/templates/admin_google_accounts.html @@ -200,7 +200,7 @@
- +