chore: 同步华为云第1台服务器上的关于Menu针对特殊用户限制的代码

This commit is contained in:
2025-11-22 15:56:34 +08:00
parent f03dbbfc60
commit 326dbb1c3c
2 changed files with 9 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ class Menu extends BaseModel
// if (!empty($cache)) { // if (!empty($cache)) {
// return $this->success($cache); // return $this->success($cache);
// } // }
$list = model('menu')->getList($condition, $field, $order, '', '', '', $limit); $list = model('menu')->getList($condition, $field, $order, '', [], '', $limit);
// Cache::tag("menu")->set("getMenuList_" . $data, $list); // Cache::tag("menu")->set("getMenuList_" . $data, $list);
return $this->success($list); return $this->success($list);

View File

@@ -197,6 +197,14 @@ class BaseShop extends Controller
$where[] = ['id','<>',2498]; $where[] = ['id','<>',2498];
$where1[] = ['id','<>',2498]; $where1[] = ['id','<>',2498];
} }
if($this->site_id != 2230){
$where[] = ['id','<>',2651];
$where1[] = ['id','<>',2651];
}
if($this->site_id != 2558){
$where[] = ['id','<>',2657];
$where1[] = ['id','<>',2657];
}
if ($this->user_info[ 'is_admin' ] || $this->group_info[ 'is_system' ] == 1) { if ($this->user_info[ 'is_admin' ] || $this->group_info[ 'is_system' ] == 1) {
$menus = $menu_model->getMenuList($where, $field, 'level asc,sort asc'); $menus = $menu_model->getMenuList($where, $field, 'level asc,sort asc');
} else { } else {