model = new AdminLogModel(); return null; } public function index(Request $request): Response { $response = $this->initializeBackend($request); if ($response !== null) return $response; if ($request->get('select') ?? $request->post('select')) { $selectRes = $this->select($request); if ($selectRes !== null) return $selectRes; } list($where, $alias, $limit, $order) = $this->queryBuilder(); if (!$this->auth->isSuperAdmin()) { $scopeIds = $this->auth->getSelfAndSubordinateAdminIds(); if ($scopeIds !== []) { $where[] = ['admin_id', 'in', $scopeIds]; } } $res = $this->model ->withJoin($this->withJoinTable, $this->withJoinType) ->alias($alias) ->where($where) ->order($order) ->paginate($limit); return $this->success('', [ 'list' => $res->items(), 'total' => $res->total(), 'remark' => get_route_remark(), ]); } /** * 远程下拉(AdminLog 无自定义,走父类默认列表) */ public function select(Request $request): Response { return parent::select($request); } }