feat : Proxy get user info

This commit is contained in:
2025-09-07 13:10:17 +08:00
parent 705d18239f
commit 32bc27596e
7 changed files with 186 additions and 0 deletions

View File

@@ -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()
{
}
}