Commit 06419166 by mushishixian

fix

parent d301f8d9
......@@ -121,8 +121,13 @@ class SupplierFilter
$query->whereRaw(DB::raw("(create_uid in $inUserIdSql or purchase_uid in $inCodeIdSql or channel_uid REGEXP '$likeSqlRaw') "));
} else {
//剩下的就只是看自己相关的
$query->whereRaw(DB::raw("(create_uid = $userId or purchase_uid = $codeId or channel_uid like '%${codeId}%') "));
if ($codeId) {
//剩下的就只是看自己相关的
$query->whereRaw(DB::raw("(create_uid = $userId or purchase_uid = $codeId or channel_uid like '%${codeId}%') "));
}else{
$query->whereRaw(DB::raw("(create_uid = $userId)"));
}
}
}
//先判断获取类型
......
......@@ -78,7 +78,7 @@ class CheckLogin
$user = $ret->data;
$intracodeModel = new IntracodeModel();
$codeId = $intracodeModel->where('admin_id', $user->userId)->value('code_id');
$user->codeId = $codeId;
$user->codeId = $codeId ?: 99999;
$request->user = $user;
}
......@@ -93,7 +93,7 @@ class CheckLogin
{
$userId = request()->user->userId;
$permsUrl = env('PERM_LIST') . '/' . $userId . '/' . env('PERM_ID') . '/';
$permsResult = json_decode(curl($permsUrl),true);
$permsResult = json_decode(curl($permsUrl), true);
$perms = [];
if (isset($permsResult['retcode']) && $permsResult['retcode'] === 0) {
$perms = $permsResult['data']['perms'];
......
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