This commit is contained in:
@ -18,7 +18,7 @@ return [
|
||||
'redis' => [
|
||||
'pool' => 'default',
|
||||
],
|
||||
'channel' => '{queue}',
|
||||
'channel' => '{default}',
|
||||
'timeout' => 2,
|
||||
'retry_seconds' => 5,
|
||||
'handle_timeout' => 10,
|
||||
@ -33,7 +33,7 @@ return [
|
||||
'redis' => [
|
||||
'pool' => 'default',
|
||||
],
|
||||
'channel' => '{drp.custom}',
|
||||
'channel' => '{queue:whf}',
|
||||
'timeout' => 2,
|
||||
'retry_seconds' => 5,
|
||||
'handle_timeout' => 10,
|
||||
|
@ -14,6 +14,8 @@ use App\JsonRpc\EasyAppServiceConsumer;
|
||||
use App\JsonRpc\EasyAppServiceInterface;
|
||||
use App\JsonRpc\InventoryServiceConsumer;
|
||||
use App\JsonRpc\InventoryServiceInterface;
|
||||
use App\JsonRpc\RoleServiceConsumer;
|
||||
use App\JsonRpc\RoleServiceInterface;
|
||||
use App\JsonRpc\UserAuthServiceConsumer;
|
||||
use App\JsonRpc\UserAuthServiceInterface;
|
||||
use App\Log\StdoutLoggerFactory;
|
||||
@ -24,4 +26,5 @@ return [
|
||||
UserAuthServiceInterface::class => UserAuthServiceConsumer::class,
|
||||
EasyAppServiceInterface::class => EasyAppServiceConsumer::class,
|
||||
InventoryServiceInterface::class => InventoryServiceConsumer::class,
|
||||
RoleServiceInterface::class => RoleServiceConsumer::class,
|
||||
];
|
||||
|
@ -18,5 +18,30 @@ return [
|
||||
'id' => 1,
|
||||
'action' => 'UserController@userLogin',
|
||||
'name' => '用户登录',
|
||||
]
|
||||
],
|
||||
[
|
||||
'id' => 2,
|
||||
'action' => 'UserController@userLogout',
|
||||
'name' => '用户登出',
|
||||
],
|
||||
[
|
||||
'id' => 3,
|
||||
'action' => 'RoleController@disableRoles',
|
||||
'name' => '禁用|启用角色',
|
||||
],
|
||||
[
|
||||
'id' => 4,
|
||||
'action' => 'RoleController@delRoles',
|
||||
'name' => '删除角色',
|
||||
],
|
||||
[
|
||||
'id' => 5,
|
||||
'action' => 'RoleController@addCompanyModule',
|
||||
'name' => '公司授权',
|
||||
],
|
||||
[
|
||||
'id' => 6,
|
||||
'action' => 'RoleController@assignRolePermissions',
|
||||
'name' => '角色授权',
|
||||
],
|
||||
];
|
@ -13,6 +13,7 @@ declare(strict_types=1);
|
||||
|
||||
use App\JsonRpc\EasyAppServiceInterface;
|
||||
use App\JsonRpc\InventoryServiceInterface;
|
||||
use App\JsonRpc\RoleServiceInterface;
|
||||
use App\JsonRpc\UserAuthServiceInterface;
|
||||
use function Hyperf\Support\value;
|
||||
|
||||
@ -23,6 +24,7 @@ return [
|
||||
'UserAuthService' => UserAuthServiceInterface::class,
|
||||
'EasyAppService' => EasyAppServiceInterface::class,
|
||||
'InventoryService' => InventoryServiceInterface::class,
|
||||
'RoleService' => RoleServiceInterface::class,
|
||||
];
|
||||
foreach ($services as $name => $interface) {
|
||||
$consumers[] = [
|
||||
|
@ -15,8 +15,10 @@ use App\Controller\CompanyController;
|
||||
use App\Controller\FirstCompanyController;
|
||||
use App\Controller\PurchaseController;
|
||||
use App\Controller\RoleController;
|
||||
use App\Controller\SystemController;
|
||||
use App\Controller\UserController;
|
||||
use App\Middleware\CheckTokenMiddleware;
|
||||
use App\Middleware\PermissionVerifyMiddleware;
|
||||
use Hyperf\HttpServer\Router\Router;
|
||||
|
||||
Router::get('/favicon.ico', function () {
|
||||
@ -29,6 +31,14 @@ Router::addGroup('/api/v1/', function () {
|
||||
});
|
||||
|
||||
Router::addGroup('/api/v1', function () {
|
||||
// 需携带 Token 接口
|
||||
Router::addGroup('/', function () {
|
||||
Router::post('user.logout', [UserController::class, 'userLogout']); # 用户登出
|
||||
|
||||
Router::get('menu.list', [SystemController::class, 'menuList']); # 系统菜单列表
|
||||
});
|
||||
|
||||
// 需携带 Token 接口且需验证权限
|
||||
Router::addGroup('/', function () {
|
||||
/**
|
||||
* 用户管理
|
||||
@ -40,7 +50,17 @@ Router::addGroup('/api/v1', function () {
|
||||
/**
|
||||
* 角色管理
|
||||
*/
|
||||
Router::post('role.add', [RoleController::class, 'addRole']); # 获取用户信息
|
||||
Router::post('role.add', [RoleController::class, 'addRole']); # 新增角色
|
||||
Router::post('role.list', [RoleController::class, 'roleList']); # 获取角色列表
|
||||
Router::post('roles.status', [RoleController::class, 'disableRoles']); # 禁用&启用角色
|
||||
Router::post('roles.delete', [RoleController::class, 'delRoles']); # 删除角色
|
||||
Router::post('assign.user.role', [RoleController::class, 'assignUserRoles']); # 分配用户角色
|
||||
Router::post('assign.role.auth', [RoleController::class, 'assignRolePermissions']); # 角色授权
|
||||
Router::post('role.permission.checked', [RoleController::class, 'roleChecked']); # 角色权限选择列表
|
||||
|
||||
// 平台公司管理
|
||||
Router::post('company.module.add', [RoleController::class, 'addCompanyModule']); # 公司模块授权
|
||||
Router::post('company.permission.checked', [RoleController::class, 'companyChecked']); # 公司模块选择列表
|
||||
|
||||
/**
|
||||
* 采购入库管理
|
||||
@ -48,9 +68,13 @@ Router::addGroup('/api/v1', function () {
|
||||
Router::post('purchase.add', [PurchaseController::class, 'addPurchase']); # 新增采购入库单
|
||||
|
||||
/**
|
||||
* 公司管理
|
||||
* 平台管理
|
||||
*/
|
||||
Router::post('company.add.first', [FirstCompanyController::class, 'addFirstCompany']); # 新增平台公司
|
||||
|
||||
/**
|
||||
* 供应商&客户管理
|
||||
*/
|
||||
Router::post('company.add', [CompanyController::class, 'addCompany']); # 新增公司
|
||||
Router::post('company.add.first', [FirstCompanyController::class, 'addFirstCompany']); # 新增平台公司
|
||||
});
|
||||
}, ['middleware' => [PermissionVerifyMiddleware::class]]);
|
||||
}, ['middleware' => [CheckTokenMiddleware::class]]);
|
Reference in New Issue
Block a user