From e4ec682f03ec234496309d247e46164dc41c51ad Mon Sep 17 00:00:00 2001 From: Dai Date: Mon, 7 Oct 2024 21:20:08 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=AF=BE=E7=A8=8B=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E4=B9=8B=E5=90=8E=E6=8F=90=E9=86=92=E5=AE=B6?= =?UTF-8?q?=E9=95=BF=E5=92=8C=E5=AD=A6=E7=94=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/SendMsgCronJobService.php | 41 ++++++++++++-------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/app/common/service/SendMsgCronJobService.php b/app/common/service/SendMsgCronJobService.php index 236cfc9..40e1909 100644 --- a/app/common/service/SendMsgCronJobService.php +++ b/app/common/service/SendMsgCronJobService.php @@ -1035,7 +1035,7 @@ class SendMsgCronJobService $send_teacher_data = [ 'touser' => $student_schedule->student_openid, - 'template_id' => 'ng-vuuY_hHM3N2fR3VCGdjGldOrwmzVVQzebRgkW4uY', + 'template_id' => 'bhnq2bLVoTx1-6dKL065JPXWTm6AVGsUmvuW8kEA1VU', 'data' => [ 'thing6' => [//课程名称 'value' => substr($student_schedule->english_name . '/' . date('m-d H:i', strtotime($student_schedule->start_time)), 0, 18) . '..', @@ -1045,12 +1045,12 @@ class SendMsgCronJobService 'value' => substr($student_schedule->english_name . '/' . date('m-d H:i', strtotime($student_schedule->start_time)), 0, 18) . '..', 'color' => '#000000' ], - 'thing5' => [//批改老师 - 'value' => $student_schedule->teacher_name, - 'color' => '#000000' - ], - 'time3' => [//机构名称 - 'value' => $next_time, +// 'thing5' => [//批改老师 +// 'value' => $student_schedule->teacher_name, +// 'color' => '#000000' +// ], + 'time4' => [//上传时间 + 'value' => $subject_homework->created_at, 'color' => '#000000' ] ], @@ -1089,7 +1089,7 @@ class SendMsgCronJobService if (!$parent->isEmpty()) { $send_teacher_data = [ 'touser' => $parent->openid, - 'template_id' => 'ng-vuuY_hHM3N2fR3VCGdjGldOrwmzVVQzebRgkW4uY', + 'template_id' => 'bhnq2bLVoTx1-6dKL065JPXWTm6AVGsUmvuW8kEA1VU', 'data' => [ 'thing6' => [//课程名称 'value' => substr($student_schedule->english_name . '/' . date('m-d H:i', strtotime($student_schedule->start_time)), 0, 18) . '..', @@ -1099,12 +1099,12 @@ class SendMsgCronJobService 'value' => substr($student_schedule->english_name . '/' . date('m-d H:i', strtotime($student_schedule->start_time)), 0, 18) . '..', 'color' => '#000000' ], - 'thing5' => [//批改老师 - 'value' => $student_schedule->teacher_name, - 'color' => '#000000' - ], - 'time3' => [//机构名称 - 'value' => $next_time, +// 'thing5' => [//批改老师 +// 'value' => $student_schedule->teacher_name, +// 'color' => '#000000' +// ], + 'time4' => [//上传时间 + 'value' => $subject_homework->created_at, 'color' => '#000000' ] ], @@ -1162,6 +1162,11 @@ class SendMsgCronJobService $subject_homework = SubjectHomework::where(['id' => $subject_homework_id])->findOrEmpty(); //查找该课程作业的课程的学生 $student_schedule = StudentSchedule::where(['teacher_schedule_time_id' => $subject_homework->teacher_schedule_time_id])->with(['student', 'subject', 'teacher'])->findOrEmpty(); + + print '
';
+            print_r($student_schedule->toArray());
+            die;
+
 //
 //            $student_homework = StudentHomework::where(['id' => $student_homework_id])->with(['teacher', 'subject'])->findOrEmpty();
 
@@ -1188,9 +1193,9 @@ class SendMsgCronJobService
 
                 $send_teacher_data = [
                     'touser' => $student_schedule->student_openid,
-                    'template_id' => 'IYIMurENbyxkQ_axIsrkjMJNb8i1AIX4qRgVUEzQX6I',
+                    'template_id' => 'ng-vuuY_hHM3N2fR3VCGdhtg5zfYRmgdiYuffPEgXDs',
                     'data' => [
-                        'thing1' => [//所属课程
+                        'thing6' => [//课程名称
                             'value' => substr($student_schedule->english_name . '/' . date('m-d H:i', strtotime($student_schedule->start_time)), 0, 18) . '..',
                             'color' => '#000000'
                         ],
@@ -1198,6 +1203,10 @@ class SendMsgCronJobService
                             'value' => substr($student_schedule->english_name . '/' . date('m-d H:i', strtotime($student_schedule->start_time)), 0, 18) . '..',
                             'color' => '#000000'
                         ],
+                        'thing9' => [//学生姓名
+                            'value' => substr($student_schedule->english_name . '/' . date('m-d H:i', strtotime($student_schedule->start_time)), 0, 18) . '..',
+                            'color' => '#000000'
+                        ],
                         'thing3' => [//批改老师
                             'value' => $student_schedule->teacher_name,
                             'color' => '#000000'