From b381dd25447c7f4bf3b8a0ca0dd772fa98938cfd Mon Sep 17 00:00:00 2001 From: Dai Date: Tue, 8 Oct 2024 21:52:40 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=8E=92=E8=AF=BE=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E8=80=81=E5=B8=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/SendMsgCronJobService.php | 2 +- plugin/admin/app/controller/TeacherScheduleTimeController.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/common/service/SendMsgCronJobService.php b/app/common/service/SendMsgCronJobService.php index 3ddcdf4..decce18 100644 --- a/app/common/service/SendMsgCronJobService.php +++ b/app/common/service/SendMsgCronJobService.php @@ -270,7 +270,7 @@ class SendMsgCronJobService ]); } - if (isset($teacher_schedule_time['teacherAttr']) && !empty($teacher_schedule_time['teacherAttr']['openid'])) { + if (isset($teacher_schedule_time['teacherAttr']) && !empty($teacher_schedule_time['teacherAttr']['openid']) && 0) { //发送给教师 $send_teacher_data = [ 'touser' => $teacher_schedule_time['teacherAttr']['openid'], diff --git a/plugin/admin/app/controller/TeacherScheduleTimeController.php b/plugin/admin/app/controller/TeacherScheduleTimeController.php index 6c86a86..df6b4f4 100644 --- a/plugin/admin/app/controller/TeacherScheduleTimeController.php +++ b/plugin/admin/app/controller/TeacherScheduleTimeController.php @@ -218,6 +218,9 @@ class TeacherScheduleTimeController extends Crud public function update(Request $request): Response { if ($request->method() === 'POST') { + if ($request->post('is_publish')) { + (new SendMsgCronJobService())->teacherScheduleTimePublishMsgToTeacher($request->post('id')); + } return parent::update($request); } $teacher = [];