PublicRpcService.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace App\JsonRpc;
  3. use Hyperf\RpcClient\AbstractServiceClient;
  4. class PublicRpcService extends AbstractServiceClient implements PublicRpcServiceInterface
  5. {
  6. /**
  7. * 定义对应服务提供者的服务名称
  8. * @var string
  9. */
  10. protected string $serviceName = 'PublicRpcService';
  11. /**
  12. * 定义对应服务提供者的服务协议
  13. * @var string
  14. */
  15. protected string $protocol = 'jsonrpc-http';
  16. /**
  17. * @param array $data
  18. * @return mixed
  19. */
  20. public function getDistrictList(array $data)
  21. {
  22. return $this->__request(__FUNCTION__, $data);
  23. }
  24. /**
  25. * @param array $data
  26. * @return mixed
  27. */
  28. public function getUserLevelList(array $data)
  29. {
  30. return $this->__request(__FUNCTION__, $data);
  31. }
  32. /**
  33. * 添加等级
  34. * @param array $data
  35. * @return array
  36. */
  37. public function addUserLevel(array $data){
  38. return $this->__request(__FUNCTION__, $data);
  39. }
  40. /**
  41. * 删除等级
  42. * @param array $data
  43. * @return array
  44. */
  45. public function delUserLevel(array $data){
  46. return $this->__request(__FUNCTION__, $data);
  47. }
  48. /**
  49. * 更新等级
  50. * @param array $data
  51. * @return array
  52. */
  53. public function updateUserLevel(array $data){
  54. return $this->__request(__FUNCTION__, $data);
  55. }
  56. }