WebsiteService.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. namespace App\JsonRpc;
  3. use Hyperf\RpcClient\AbstractServiceClient;
  4. class WebsiteService extends AbstractServiceClient implements WebsiteServiceInterface
  5. {
  6. /**
  7. * 定义对应服务提供者的服务名称
  8. * @var string
  9. */
  10. protected string $serviceName = 'WebsiteService';
  11. /**
  12. * 定义对应服务提供者的服务协议
  13. * @var string
  14. */
  15. protected string $protocol = 'jsonrpc-http';
  16. /**
  17. * @param string $keyword
  18. * @param int $page
  19. * @param int $pageSize
  20. * @return mixed
  21. */
  22. public function getWebsitetList(string $keyword, int $page, int $pageSize)
  23. {
  24. // TODO: Implement getWebsitetList() method.
  25. return $this->__request(__FUNCTION__, compact('keyword','page','pageSize'));
  26. }
  27. /**
  28. * @param array $data
  29. * @return mixed
  30. */
  31. public function createWebsite(array $data)
  32. {
  33. // TODO: Implement createWebsite() method.
  34. return $this->__request(__FUNCTION__, $data);
  35. }
  36. /**
  37. * @param int $id
  38. * @param array $data
  39. * @return mixed
  40. */
  41. public function updateWebsite(int $id, array $data)
  42. {
  43. // TODO: Implement updateWebsite() method.
  44. return $this->__request(__FUNCTION__,$id, $data);
  45. }
  46. /**
  47. * @param int $id
  48. * @return mixed
  49. */
  50. public function delWebsite(int $id)
  51. {
  52. // TODO: Implement delWebsite() method.
  53. return $this->__request(__FUNCTION__,$id);
  54. }
  55. /**
  56. * @param int $id
  57. * @return mixed
  58. */
  59. public function getWebsiteInfo(int $id)
  60. {
  61. // TODO: Implement getWebsiteInfo() method.
  62. return $this->__request(__FUNCTION__,$id);
  63. }
  64. }