diff --git a/app/common/service/SendMsgCronJobService.php b/app/common/service/SendMsgCronJobService.php index c19c55d..b09ea5c 100644 --- a/app/common/service/SendMsgCronJobService.php +++ b/app/common/service/SendMsgCronJobService.php @@ -338,8 +338,8 @@ class SendMsgCronJobService { try { $teacher_schedule_time = TeacherScheduleTime::where(['is_publish' => 1]) - ->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'))) + ->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'))) ->with(['teacherAttr', 'subject', 'studentSchedule']) ->select(); @@ -367,6 +367,10 @@ class SendMsgCronJobService // throw new Exception('未找到课程分配的学生'); } + print '
'; + print_r($item->toArray()); + die; + $student_info = []; foreach ($studentSchedule as $student) { if (!$student['is_publish']) { @@ -519,7 +523,7 @@ class SendMsgCronJobService 'color' => '#000000' ], 'thing4' => [//任课教师 - 'value' => $item->teacherAttr->teacher_name, + 'value' => $item->teacherAttr->account, 'color' => '#000000' ], 'thing7' => [//学员姓名 @@ -569,7 +573,7 @@ class SendMsgCronJobService /** - * 上课时间 提前一天通知老师 + * 上课时间 提前10分钟通知 * @return void */ public function classBeginMsgToMsgBeforeTenMinute() @@ -639,7 +643,6 @@ class SendMsgCronJobService throw new Exception('未找到课程分配的学生'); } - var_dump($item->toArray()); $send_teacher_data = [ 'touser' => $item['teacherAttr']['openid'], @@ -650,11 +653,11 @@ class SendMsgCronJobService 'color' => '#000000' ], 'time5' => [//上课时间 - 'value' => $item->end_time, + 'value' => $item->en_start_time, 'color' => '#000000' ], 'thing4' => [//任课教师 - 'value' => $item->teacherAttr->teacher_name, + 'value' => $item->teacherAttr->account, 'color' => '#000000' ], 'thing7' => [//学员姓名 @@ -702,11 +705,11 @@ class SendMsgCronJobService 'color' => '#000000' ], 'time5' => [//上课时间 - 'value' => $item->end_time, + 'value' => $item->start_time, 'color' => '#000000' ], 'thing4' => [//任课教师 - 'value' => $item->teacherAttr->teacher_name, + 'value' => $item->teacherAttr->account, 'color' => '#000000' ], 'thing7' => [//学员姓名 @@ -755,11 +758,11 @@ class SendMsgCronJobService 'color' => '#000000' ], 'time5' => [//上课时间 - 'value' => $item->end_time, + 'value' => $item->start_time, 'color' => '#000000' ], 'thing4' => [//任课教师 - 'value' => $item->teacherAttr->teacher_name, + 'value' => $item->teacherAttr->account, 'color' => '#000000' ], 'thing7' => [//学员姓名