From d2942f4bd2391270dafc575fd592f887a40b6663 Mon Sep 17 00:00:00 2001 From: Dai Date: Fri, 9 May 2025 16:32:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=B8=88=E7=AB=AF=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=AC=E5=9C=B0=E6=97=B6=E9=97=B4=E3=80=81?= =?UTF-8?q?=E4=B8=AD=E5=9B=BD=E6=97=B6=E9=97=B4=E5=AD=97=E6=AE=B5=EF=BC=8C?= =?UTF-8?q?=E6=95=99=E5=B8=88=E6=8E=92=E8=AF=BE=E6=B7=BB=E5=8A=A0=E6=97=B6?= =?UTF-8?q?=E5=8C=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/model/TeacherScheduleTime.php | 2 -- app/common/service/TeacherScheduleTimeService.php | 2 +- .../app/controller/TeacherScheduleTimeController.php | 10 ++++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/common/model/TeacherScheduleTime.php b/app/common/model/TeacherScheduleTime.php index 5bd82e0..7dcc959 100644 --- a/app/common/model/TeacherScheduleTime.php +++ b/app/common/model/TeacherScheduleTime.php @@ -24,8 +24,6 @@ class TeacherScheduleTime extends BaseModel return $this->hasOne(Teacher::class, 'id', 'teacher_id')->bind([ 'teacher_account' => 'account', 'teacher_name', - 'time_zone_name', - 'time_zone_offset' ]); } diff --git a/app/common/service/TeacherScheduleTimeService.php b/app/common/service/TeacherScheduleTimeService.php index 95b5939..f60c2f8 100644 --- a/app/common/service/TeacherScheduleTimeService.php +++ b/app/common/service/TeacherScheduleTimeService.php @@ -100,7 +100,7 @@ class TeacherScheduleTimeService $schedule->where('date', $data['date']); } - $list = $schedule->field('id,teacher_id,date,time,en_time,hour,month,subject_id,is_publish') + $list = $schedule->field('id,teacher_id,date,en_date,time,en_time,hour,month,en_month,time_zone_id,time_zone_name,time_zone_abbr,time_zone_offset,subject_id,is_publish') ->with(['subject', 'studentSchedule', 'teacher', 'studentHomework']) ->select()->toArray(); diff --git a/plugin/admin/app/controller/TeacherScheduleTimeController.php b/plugin/admin/app/controller/TeacherScheduleTimeController.php index ffcc217..16524b6 100644 --- a/plugin/admin/app/controller/TeacherScheduleTimeController.php +++ b/plugin/admin/app/controller/TeacherScheduleTimeController.php @@ -238,6 +238,11 @@ class TeacherScheduleTimeController extends Crud 'en_end_time' => $en_end_time, 'month' => $free_time->month, 'en_month' => $free_time->en_month, + 'time_zone_id' => $free_time->time_zone_id, + 'time_zone_abbr' => $free_time->time_zone_abbr, + 'time_zone_name' => $free_time->time_zone_name, + 'time_zone_offset' => $free_time->time_zone_offset, + 'en_month' => $free_time->en_month, 'subject_id' => $data['subject_id'][$index], 'free_time_id' => $free_time->id, ]); @@ -255,6 +260,11 @@ class TeacherScheduleTimeController extends Crud 'en_end_time' => $en_end_time, 'month' => $free_time->month, 'en_month' => $free_time->en_month, + 'en_month' => $free_time->en_month, + 'time_zone_id' => $free_time->time_zone_id, + 'time_zone_abbr' => $free_time->time_zone_abbr, + 'time_zone_name' => $free_time->time_zone_name, + 'time_zone_offset' => $free_time->time_zone_offset, 'subject_id' => $data['subject_id'][$index], 'free_time_id' => $free_time->id, ]);