From 56e57969fbd1cf99165e9c33dbb1d820a8359e86 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Fri, 22 Dec 2023 15:51:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=97=A5=E7=A8=8B-=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E5=85=AC=E5=8F=B8=E6=AF=8F=E6=97=A5=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task_scheduling_plan/TaskSchedulingPlanController.php | 4 ++-- app/common/model/task_scheduling_plan/TaskSchedulingPlan.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/adminapi/controller/task_scheduling_plan/TaskSchedulingPlanController.php b/app/adminapi/controller/task_scheduling_plan/TaskSchedulingPlanController.php index 81bf41b27..3e4efb6a4 100644 --- a/app/adminapi/controller/task_scheduling_plan/TaskSchedulingPlanController.php +++ b/app/adminapi/controller/task_scheduling_plan/TaskSchedulingPlanController.php @@ -120,13 +120,13 @@ class TaskSchedulingPlanController extends BaseAdminController { $companyId = $this->request->param('company_id', 0); $date = $this->request->param('date',); - $list = TaskSchedulingPlan::where(['company_id' => $companyId]) + $lists = TaskSchedulingPlan::where(['company_id' => $companyId]) ->where('start_time', strtotime($date)) ->with(['template','templateInfo', 'task']) ->order(['id' => 'desc']) ->select() ->toArray(); - return $this->success('', $list); + return $this->success('', compact('lists')); } diff --git a/app/common/model/task_scheduling_plan/TaskSchedulingPlan.php b/app/common/model/task_scheduling_plan/TaskSchedulingPlan.php index e2a4ccefe..246414467 100644 --- a/app/common/model/task_scheduling_plan/TaskSchedulingPlan.php +++ b/app/common/model/task_scheduling_plan/TaskSchedulingPlan.php @@ -49,7 +49,7 @@ class TaskSchedulingPlan extends BaseModel } public function task() { - return $this->hasOne(Task::class, 'task_id', 'id'); + return $this->hasOne(Task::class, 'id', 'task_id'); } public function templateInfo() {