修改用户模块

This commit is contained in:
wuyanwen 2020-01-14 18:31:18 +08:00
parent 3983c413f6
commit 418a6d5418
2 changed files with 2 additions and 15 deletions

View File

@ -54,7 +54,8 @@ class User extends CatchController
$user->roles = $roles; $user->roles = $roles;
dd(Roles::getDepartmentUserIdsBy($roles)); // 用户数据权限
// $user->data_range = Roles::getDepartmentUserIdsBy($roles);
return CatchResponse::success($user); return CatchResponse::success($user);
} }

View File

@ -82,18 +82,4 @@ class Users extends CatchModel
return array_unique($permissionIds); return array_unique($permissionIds);
} }
/**
* 获取部门下的用户
*
* @time 2020年01月14日
* @param $deptIds
* @return mixed
*/
public static function getUserIdsByDepartmentIds($deptIds)
{
$ids = parent::whereIn('id', $deptIds)->value('id');
return $ids ? $ids->toArray() : [];
}
} }