Commit cc95ab2a by 朱继来

调整权限角色

parent 432d21b5
Showing with 4 additions and 3 deletions
......@@ -59,11 +59,12 @@
// 根据用户ID和业务ID查看角色
$userPerm = DB::table('t_user_perm')->where(['userId' => $uid, 'bid' => $bid])->first();
$role = json_decode($userPerm->roles, true);
if (empty($role)) {
if (empty($userPerm)) {
return 0;
} else {
$role = json_decode($userPerm->roles, true);
foreach ($role as $v) {
$department = DB::table('t_role_perm')->where(['roleId' => $v, 'bid' => $bid])->first();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment