公众号消息
This commit is contained in:
parent
2de9173d6d
commit
f8968d70ea
@ -17,6 +17,30 @@ class SendMsgCronJobService
|
|||||||
const TEACHER_SCHEDULE_TIME_PUBLISH_STUDENT = 'teacher_schedule_time_publish_to_teacher';
|
const TEACHER_SCHEDULE_TIME_PUBLISH_STUDENT = 'teacher_schedule_time_publish_to_teacher';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通知类型
|
||||||
|
*/
|
||||||
|
const SCHEDULE_TIME_PUBLISH_TO_TEACHER = 'schedule_time_publish_to_teacher';
|
||||||
|
const SCHEDULE_TIME_PUBLISH_TO_STUDENT = 'schedule_time_publish_to_student';
|
||||||
|
const CLASS_BEGIN_NOTIFY_TEACHER = 'class_begin_notify_teacher';
|
||||||
|
const SUBJECT_UPLOAD_NOTIFY_ADMIN = 'subject_upload_notify_admin';
|
||||||
|
const SUBJECT_VERSION_UPLOAD_NOTIFY_STUDENT = 'subject_version_upload_notify_student';
|
||||||
|
const STUDENT_UPLOAD_HOMEWORK_NOTIFY_TEACHER = 'student_upload_homework_notify_teacher';
|
||||||
|
const ADMIN_NOTIFY_STUDENT_SCHEDULE_TIME = 'admin_notify_student_schedule_time';
|
||||||
|
const ADMIN_NOTIFY_TEACHER_SUBMIT_FREE_TIME = 'admin_notify_teacher_submit_free_time';
|
||||||
|
|
||||||
|
|
||||||
|
const MSG_TYPE = [
|
||||||
|
'schedule_time_publish_to_teacher' => '课程时间发布通知教师',//后台分配好课程时间之后发布时发送
|
||||||
|
'schedule_time_publish_to_student' => '课程安排学生发布通知学生',//课程时间选好学生发布之后发送
|
||||||
|
'class_begin_notify_teacher' => '课程开始前一天通知教师',//课程开始前一天通知教师
|
||||||
|
'subject_upload_notify_admin' => '教师上传课程作业通知管理员',//教师上传课程作业之后通知管理员
|
||||||
|
'subject_version_upload_notify_student' => '课程作业翻译后通知学生',//课程作业管理员翻译发布之后通知学生
|
||||||
|
'student_upload_homework_notify_teacher' => '学生上传课程作业通知教师',//学生上传课程作业之后通知教师
|
||||||
|
'admin_notify_student_schedule_time' => '管理员通知学生上课时间',//管理员通知学生上课时间确定提醒
|
||||||
|
'admin_notify_teacher_submit_free_time' => '管理员通知教师上传空闲时间',//管理员通知教师上传空闲时间
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排课成功通知
|
* 排课成功通知
|
||||||
* @param $teacher_schedule_time_id
|
* @param $teacher_schedule_time_id
|
||||||
@ -405,13 +429,12 @@ class SendMsgCronJobService
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function studentScheduleConfirmNotifyTeacher($student_schedule_id)
|
public function studentScheduleConfirmNotifyTeacher($student_schedule_id)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$student_schedule = StudentSchedule::where(['id'=>$student_schedule_id, 'is_publish'=>1])->with(['teacher', 'student', 'subject'])->findOrEmpty();
|
$student_schedule = StudentSchedule::where(['id' => $student_schedule_id, 'is_publish' => 1])->with(['teacher', 'student', 'subject'])->findOrEmpty();
|
||||||
|
|
||||||
if($student_schedule->isEmpty()){
|
if ($student_schedule->isEmpty()) {
|
||||||
throw new Exception('未找到');
|
throw new Exception('未找到');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -455,7 +478,7 @@ class SendMsgCronJobService
|
|||||||
'data' => [],
|
'data' => [],
|
||||||
'msg' => 'success'
|
'msg' => 'success'
|
||||||
];
|
];
|
||||||
}catch (Exception $e){
|
} catch (Exception $e) {
|
||||||
return [
|
return [
|
||||||
'code' => ResponseCode::FAIL,
|
'code' => ResponseCode::FAIL,
|
||||||
'msg' => $e->getMessage()
|
'msg' => $e->getMessage()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user