__handlePropertyHandler(__CLASS__); } /** * @var AdServiceInterface */ #[Inject] private $adServiceInterface; public function createAd() { $name = (string) $this->request->input('name', ''); $gender = (string) $this->request->input('url', 0); $result = $this->adServiceInterface->createAd($name, $gender); return $result ? Result::success($result['data']) : Result::error($result['message']); } /** * @return array|void */ public function getAdInfo() { $id = (int) $this->request->input('id'); $result = $this->adServiceInterface->getAdInfo($id); // $this->logger->info("ceshi--"); if ($result['code'] != ErrorCode::SUCCESS) { return Result::error($result['message'], 0); } return Result::success($result['data']); } }