feat : Proxy get user info
This commit is contained in:
@@ -8,6 +8,8 @@ use App\Service\Test\Proxy\AopService;
|
||||
use App\Service\Test\Proxy\BasicSubjectService;
|
||||
use App\Service\Test\Proxy\DynamicProxyService;
|
||||
use App\Service\Test\Proxy\Payment\PaymentService;
|
||||
use App\Service\Test\Proxy\UserInfoService;
|
||||
use App\Service\Test\Proxy\UserService;
|
||||
use Hyperf\HttpServer\Annotation\Controller;
|
||||
use Hyperf\HttpServer\Annotation\RequestMapping;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
@@ -17,6 +19,7 @@ use Psr\Container\NotFoundExceptionInterface;
|
||||
class ProxyController
|
||||
{
|
||||
/**
|
||||
* 静态代理
|
||||
* @return array
|
||||
*/
|
||||
#[RequestMapping(path: 'basic', methods: 'GET')]
|
||||
@@ -26,6 +29,7 @@ class ProxyController
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态代理
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
@@ -37,6 +41,7 @@ class ProxyController
|
||||
}
|
||||
|
||||
/**
|
||||
* aop代理
|
||||
* @return array
|
||||
*/
|
||||
#[RequestMapping(path: 'payment', methods: 'GET')]
|
||||
@@ -44,4 +49,19 @@ class ProxyController
|
||||
{
|
||||
return (new AopService)->handle();
|
||||
}
|
||||
|
||||
/**
|
||||
* 缓存代理
|
||||
* @return array
|
||||
*/
|
||||
#[RequestMapping(path: 'get_user_info', methods: 'GET')]
|
||||
public function getUserInfo(): array
|
||||
{
|
||||
return (new UserService)->handle();
|
||||
}
|
||||
|
||||
public function remote()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user