fix 定时任务通知

This commit is contained in:
Dai 2024-11-06 21:25:54 +08:00
parent da8dab751f
commit f4d02d27a0

View File

@ -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 '<pre>';
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' => [//学员姓名