12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- namespace App\JsonRpc;
- use Hyperf\RpcClient\AbstractServiceClient;
- class WebsiteService extends AbstractServiceClient implements WebsiteServiceInterface
- {
- /**
- * 定义对应服务提供者的服务名称
- * @var string
- */
- protected string $serviceName = 'WebsiteService';
- /**
- * 定义对应服务提供者的服务协议
- * @var string
- */
- protected string $protocol = 'jsonrpc-http';
- /**
- * @param string $keyword
- * @param int $page
- * @param int $pageSize
- * @return mixed
- */
- public function getWebsitetList(string $keyword, int $page, int $pageSize)
- {
- // TODO: Implement getWebsitetList() method.
- return $this->__request(__FUNCTION__, compact('keyword','page','pageSize'));
- }
- /**
- * @param array $data
- * @return mixed
- */
- public function createWebsite(array $data)
- {
- // TODO: Implement createWebsite() method.
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * @param int $id
- * @param array $data
- * @return mixed
- */
- public function updateWebsite(int $id, array $data)
- {
- // TODO: Implement updateWebsite() method.
- return $this->__request(__FUNCTION__,$id, $data);
- }
- /**
- * @param int $id
- * @return mixed
- */
- public function delWebsite(int $id)
- {
- // TODO: Implement delWebsite() method.
- return $this->__request(__FUNCTION__,$id);
- }
- /**
- * @param int $id
- * @return mixed
- */
- public function getWebsiteInfo(int $id)
- {
- // TODO: Implement getWebsiteInfo() method.
- return $this->__request(__FUNCTION__,$id);
- }
- }
|