From f65ff27434ef7091945de4fb01cf2b6bc39ee6a3 Mon Sep 17 00:00:00 2001 From: xiang Date: Sat, 20 Sep 2025 01:03:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=A0=A1=E9=AA=8C=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=BB=A1=E8=B6=B3=E5=BC=80=E5=B8=82=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/xiang/xservice/basic/utils/DateUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xservice-common/src/main/java/com/xiang/xservice/basic/utils/DateUtils.java b/xservice-common/src/main/java/com/xiang/xservice/basic/utils/DateUtils.java index 971de0a..8e5e32a 100644 --- a/xservice-common/src/main/java/com/xiang/xservice/basic/utils/DateUtils.java +++ b/xservice-common/src/main/java/com/xiang/xservice/basic/utils/DateUtils.java @@ -73,15 +73,15 @@ public class DateUtils { if (Objects.equals(LocalDateTime.now().getDayOfWeek(), DayOfWeek.SATURDAY) || Objects.equals(LocalDateTime.now().getDayOfWeek(), DayOfWeek.SUNDAY)) { log.info("当前时间为:{}", LocalDateTime.now()); - return false; + return true; } LocalTime now = LocalTime.now(); boolean inMorning = now.isAfter(LocalTime.of(9, 29)) && now.isBefore(LocalTime.of(11, 31)); boolean inAfternoon = now.isAfter(LocalTime.of(12, 59)) && now.isBefore(LocalTime.of(15, 1)); if (!inAfternoon && !inMorning) { - return false; + return true; } - return true; + return false; } }