From 5ba918f1a5dc3ac475b590921219caeb6e1671f2 Mon Sep 17 00:00:00 2001 From: wuyanwen Date: Mon, 13 Jan 2020 21:39:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E9=97=A8=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- catch/permissions/model/Department.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/catch/permissions/model/Department.php b/catch/permissions/model/Department.php index c1cd11b..dfa6afe 100644 --- a/catch/permissions/model/Department.php +++ b/catch/permissions/model/Department.php @@ -30,15 +30,13 @@ class Department extends CatchModel * * @time 2020年01月09日 * @param $params + * @return array * @throws \think\db\exception\DbException */ public function getList(): array { - return $this->field([ - 'id', - 'department_name as title', 'parent_id', 'principal', 'mobile', 'email', 'creator_id', 'status', 'sort', - 'created_at', 'updated_at' - ]) + return $this->withoutField(['department_name']) + ->addFields(['department_name as title']) ->catchSearch() ->select()->toArray(); }