adminId = (int) $this->getToken()?->claims()?->get(RegisteredClaims::ID) ?? 0; if ($this->adminId > 0) Context::set('current_admin_id', $this->adminId); } /** * 主函数抽象类 */ abstract public function handle(); /** * @return int */ protected function getCurrentPage(): int { return (int) $this->request->input('page', 1); } /** * @return int */ protected function getPageSize(): int { return (int) $this->request->input('page_size', 20); } /** * @return array */ protected function getRequestData(): array { return $this->request->all(); } }