service = $app->make(ProductService::class); } public function list(): \think\Response { return responseOk($this->service->list(self::$input)); } public function detail($id): \think\Response { return responseOk($this->service->detailById($id)); } public function create(): \think\Response { $this->service->create(self::$input); return responseOk(); } public function update(): \think\Response { $this->service->update(self::$input); return responseOk(); } public function delete($id): \think\Response { $this->service->deleteById($id); return responseOk(); } }