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); }