From de336fd03dbbe9955aeb5fdee21e6282239d5ffc Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 10 Sep 2021 16:35:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 0f4ce66aa..cb480872d 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2894,7 +2894,7 @@ function getAdminDepartmentList(array $ids) } $rows = M('auth_group_access', 'sys_')->field(['uid', 'group_id'])->where(['uid' => ['in', $ids]])->select(); $groups = []; - if (count($groups) > 0) { + if (count($rows) > 0) { $groups = M('auth_group', 'sys_')->field(['id', 'department_id', 'department_name'])->where(['id' => ['in', array_column($rows, 'group_id')]])->select(); $groups = index_by_column('id', $groups); }