Commit 30b5d102 by 朱继来

Merge branch 'zjl_adjust_20181026' into development

parents e4926887 cc95ab2a
Showing with 4 additions and 3 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($userPerm)) {
if (empty($role)) {
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