diff --git a/app/common/service/SendMsgCronJobService.php b/app/common/service/SendMsgCronJobService.php index 3eab20b..45dc67a 100644 --- a/app/common/service/SendMsgCronJobService.php +++ b/app/common/service/SendMsgCronJobService.php @@ -641,8 +641,10 @@ class SendMsgCronJobService throw new Exception('未找到课程分配的学生'); } + var_dump($item->toArray()); + $send_teacher_data = [ - 'touser' => $item['teacherArr']['openid'], + 'touser' => $item['teacherAttr']['openid'], 'template_id' => 'yYw0jnlhjnq4AJ_CAlAghgGyV0bvbVHG-eV8TNC3REI', 'data' => [ 'thing8' => [//课程名称 @@ -694,7 +696,7 @@ class SendMsgCronJobService foreach ($student_info as $student) { //通知学生 $send_teacher_data = [ - 'touser' => $student['openid']->openid, + 'touser' => $student['openid'], 'template_id' => 'yYw0jnlhjnq4AJ_CAlAghgGyV0bvbVHG-eV8TNC3REI', 'data' => [ 'thing8' => [//课程名称