更新一下邮箱到期的算法
This commit is contained in:
parent
c735ffae5e
commit
993674b46d
@ -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);
|
||||
|
||||
@ -200,7 +200,7 @@
|
||||
<label for="check-enabled">开启到期检查</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cron-expression">Cron 表达式</label>
|
||||
<label for="cron-expression">Cron 表达式(Spring)</label>
|
||||
<input type="text" id="cron-expression" placeholder="例如: 0 0 10 * * ?">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user