Commit cc9db6fa by 朱继来

Merge branch 'zjl_adjust_20181026'

parents e2926318 cc95ab2a
Showing with 3 additions and 2 deletions
...@@ -59,11 +59,12 @@ ...@@ -59,11 +59,12 @@
// 根据用户ID和业务ID查看角色 // 根据用户ID和业务ID查看角色
$userPerm = DB::table('t_user_perm')->where(['userId' => $uid, 'bid' => $bid])->first(); $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; return 0;
} else { } else {
$role = json_decode($userPerm->roles, true);
foreach ($role as $v) { foreach ($role as $v) {
$department = DB::table('t_role_perm')->where(['roleId' => $v, 'bid' => $bid])->first(); $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