AdService.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. namespace App\JsonRpc;
  3. use Hyperf\RpcClient\AbstractServiceClient;
  4. class AdService extends AbstractServiceClient implements AdServiceInterface
  5. {
  6. /**
  7. * 定义对应服务提供者的服务名称
  8. * @var string
  9. */
  10. protected string $serviceName = 'AdService';
  11. /**
  12. * 定义对应服务提供者的服务协议
  13. * @var string
  14. */
  15. protected string $protocol = 'jsonrpc-http';
  16. /**
  17. * @param array $data
  18. * @return array|mixed
  19. */
  20. public function createAd(array $data)
  21. {
  22. return $this->__request(__FUNCTION__, $data);
  23. }
  24. /**
  25. * @param int $id
  26. * @return array|mixed
  27. */
  28. public function getAdInfo(int $id)
  29. {
  30. return $this->__request(__FUNCTION__, compact('id'));
  31. }
  32. /**
  33. * @param array $data
  34. * @return mixed
  35. */
  36. public function getAdList(array $data)
  37. {
  38. return $this->__request(__FUNCTION__, $data);
  39. }
  40. /**
  41. * @param array $data
  42. * @return mixed
  43. */
  44. public function updateAd(array $data)
  45. {
  46. return $this->__request(__FUNCTION__, $data);
  47. }
  48. /**
  49. * @param array $data
  50. * @return mixed
  51. */
  52. public function delAd(array $data)
  53. {
  54. return $this->__request(__FUNCTION__, $data);
  55. }
  56. /**
  57. * @param array $data
  58. * @return mixed
  59. */
  60. public function getAdPlaceList(array $data)
  61. {
  62. return $this->__request(__FUNCTION__, $data);
  63. }
  64. /**
  65. * @param array $data
  66. * @return mixed
  67. */
  68. public function createAdPlace(array $data)
  69. {
  70. return $this->__request(__FUNCTION__, $data);
  71. }
  72. /**
  73. * @param array $data
  74. * @return mixed
  75. */
  76. public function updateAdPlace(array $data)
  77. {
  78. return $this->__request(__FUNCTION__, $data);
  79. }
  80. /**
  81. * @param array $data
  82. * @return mixed
  83. */
  84. public function delAdPlace(array $data)
  85. {
  86. return $this->__request(__FUNCTION__, $data);
  87. }
  88. }