feat : site
This commit is contained in:
25
app/Controller/Api/SystemController.php
Normal file
25
app/Controller/Api/SystemController.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Controller\Api;
|
||||
|
||||
use App\Controller\AbstractController;
|
||||
use App\Middleware\Api\JwtAuthMiddleware;
|
||||
use App\Service\Api\System\SiteListService;
|
||||
use Hyperf\HttpServer\Annotation\Controller;
|
||||
use Hyperf\HttpServer\Annotation\Middlewares;
|
||||
use Hyperf\HttpServer\Annotation\RequestMapping;
|
||||
use Hyperf\Validation\Annotation\Scene;
|
||||
|
||||
|
||||
#[Controller(prefix: 'api/system')]
|
||||
class SystemController extends AbstractController
|
||||
{
|
||||
#[RequestMapping(path: 'site/search_list',methods: 'POST')]
|
||||
#[Scene(scene: 'search_list')]
|
||||
public function searchSiteList()
|
||||
{
|
||||
return (new SiteListService)->handle();
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ use App\Controller\AbstractController;
|
||||
use App\Middleware\Api\JwtAuthMiddleware;
|
||||
use App\Request\Api\UserRequest;
|
||||
use App\Service\Api\User\BindPhoneByWxService;
|
||||
use App\Service\Api\User\SiteService;
|
||||
use Hyperf\HttpServer\Annotation\Controller;
|
||||
use Hyperf\HttpServer\Annotation\Middlewares;
|
||||
use Hyperf\HttpServer\Annotation\RequestMapping;
|
||||
@@ -33,4 +34,38 @@ class UserController extends AbstractController
|
||||
{
|
||||
return (new BindPhoneByWxService)->handle();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
#[RequestMapping(path: 'site/list',methods: 'post')]
|
||||
#[Scene(scene: 'site_list')]
|
||||
public function userSiteList()
|
||||
{
|
||||
return (new SiteService)->handle();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
#[RequestMapping(path: 'site/add',methods: 'post')]
|
||||
#[Scene(scene: 'add_site')]
|
||||
public function addSite()
|
||||
{
|
||||
return (new SiteService)->add();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
#[RequestMapping(path: 'site/del',methods: 'post')]
|
||||
#[Scene(scene: 'del_site')]
|
||||
public function delSite()
|
||||
{
|
||||
return (new SiteService)->del();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user