fix 学生提交作业bug

This commit is contained in:
Dai 2024-10-09 09:46:07 +08:00
parent c7614a1d0c
commit 34e07d8bd6
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ class StudentHomeworkService
$data = $request->post();
$subject_homework = SubjectHomework::where(['teacher_schedule_time_id' => $data['subject_homework_id'], 'is_publish' => 1])->findOrEmpty();
$subject_homework = SubjectHomework::where(['id' => $data['subject_homework_id'], 'is_publish' => 1])->findOrEmpty();
if ($subject_homework->isEmpty()) {
throw new Exception('老师还未布置课程作业');
}

View File

@ -13,7 +13,7 @@ class Task
// 每天的7点50执行注意这里省略了秒位
new Crontab('50 7 * * *', function(){
//上课前一天提醒教师、学生、家长
(new SendMsgCronJobService())->classBeginMsgToTeacher();
(new SendMsgCronJobService())->classBeginSingleMsgToTeacher();
});
// 每分钟执行一次