From da8dab751faab3fe3153ae1ed05004497ddf7ef6 Mon Sep 17 00:00:00 2001 From: Dai Date: Wed, 6 Nov 2024 21:18:26 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=8F=90=E5=89=8D=E4=B8=80=E5=A4=A9?= =?UTF-8?q?=E7=BB=99=E6=95=99=E5=B8=88=E5=8F=91=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/SendMsgCronJobService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/common/service/SendMsgCronJobService.php b/app/common/service/SendMsgCronJobService.php index 86d3976..c19c55d 100644 --- a/app/common/service/SendMsgCronJobService.php +++ b/app/common/service/SendMsgCronJobService.php @@ -338,14 +338,14 @@ class SendMsgCronJobService { try { $teacher_schedule_time = TeacherScheduleTime::where(['is_publish' => 1]) - ->whereTime('start_time', '>=', date('Y-m-d 00:00:00', strtotime('+0 day'))) - ->whereTime('start_time', '<=', date('Y-m-d 23:59:59', strtotime('+0 day'))) + ->whereTime('start_time', '>=', date('Y-m-d 00:00:00', strtotime('+1 day'))) + ->whereTime('start_time', '<=', date('Y-m-d 23:59:59', strtotime('+1 day'))) ->with(['teacherAttr', 'subject', 'studentSchedule']) ->select(); foreach ($teacher_schedule_time as $item) { $studentSchedule = $item->studentSchedule->toArray(); - if (!empty($studentSchedule)) { + if (empty($studentSchedule)) { CronJob::create([ 'msg_type' => self::CLASS_BEGIN_NOTIFY_TEACHER, 'teacher_id' => $item->teacher_id,