123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- <?php
- namespace App\JsonRpc;
- use Hyperf\RpcClient\AbstractServiceClient;
- class UserService extends AbstractServiceClient implements UserServiceInterface
- {
- /**
- * 定义对应服务提供者的服务名称
- * @var string
- */
- protected string $serviceName = 'UserService';
- /**
- * 定义对应服务提供者的服务协议
- * @var string
- */
- protected string $protocol = 'jsonrpc-http';
- /**
- * @param string $name
- * @param int $gender
- * @return mixed|string
- */
- public function createUser(array $data)
- {
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * @param int $id
- * @return array|mixed
- */
- public function getUserInfo(int $id)
- {
- return $this->__request(__FUNCTION__, compact('id'));
- }
- /**
- * @param array $data
- * @return array|mixed
- */
- public function getUserList(array $data)
- {
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * @param array $data
- * @return mixed
- */
- public function verifyUserInfo(array $data)
- {
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * @remark 创建登录日志信息
- * @param array $data
- */
- public function createUserLogin(array $data): mixed{
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * 更新用户信息
- * @param array $data
- */
- public function updateUser(array $data): mixed{
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * 更新用户
- * @param array $data
- */
- public function updateUserInfo(array $data){
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * 删除用户
- * @param int $id
- */
- public function delUser(int $id){
- return $this->__request(__FUNCTION__, compact('id'));
- }
- /**
- * 添加角色
- * @param array $data
- * @return array
- */
- public function addRole(array $data){
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * 删除角色
- * @param array $data
- * @return array
- */
- public function delRole(array $data){
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * 更新角色
- * @param array $data
- * @return array
- */
- public function updateRole(array $data){
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * 角色列表
- * @param array $data
- * @return array
- */
- public function roleList(array $data){
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * 角色信息
- * @param array $data
- * @return array
- */
- public function roleInfo(array $data){
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * @param array $data
- * @return array|mixed
- */
- public function getWechatInfo(array $data){
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * @param array $data
- * @return array|mixed
- */
- public function addWechatInfo(array $data){
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * @param array $data
- * @return array|mixed
- */
- public function changePassword(array $data){
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * @param array $data
- * @return array|mixed
- */
- public function upUserStatus(array $data){
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * @param array $data
- * @return array|mixed
- */
- public function resetPassword(array $data){
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * @param array $data
- * @return array|mixed
- */
- public function updateUserAvatarNickname(array $data){
- return $this->__request(__FUNCTION__, $data);
- }
- /**
- * @param array $data
- * @return array|mixed
- */
- public function getWebsiteGroupInfo(array $data){
- return $this->__request(__FUNCTION__, $data);
- }
- }
|