diff --git a/plugin/admin/app/controller/StudentHomeworkController.php b/plugin/admin/app/controller/StudentHomeworkController.php index fee4393..74025f2 100644 --- a/plugin/admin/app/controller/StudentHomeworkController.php +++ b/plugin/admin/app/controller/StudentHomeworkController.php @@ -187,6 +187,11 @@ class StudentHomeworkController extends Crud $subject_homework->save([ 'is_publish' => $request->post('is_publish') ]); + + if($subject_homework->is_publish){ + //后台发布学生作业之后通知教师 + (new SendMsgCronJobService())->studentUploadSubjectHomeworkNotifyTeacher($subject_homework->id); + } return json([ 'code' => ResponseCode::WEB_API_SUCCESS, 'msg' => 'success'