feat : kitchen
This commit is contained in:
@@ -23,8 +23,7 @@ class AdminOperationAspect extends AbstractAspect
|
||||
public array $classes = [
|
||||
'App\\Service\\Admin\\User\\*Service',
|
||||
'App\\Service\\Admin\\Third\\*Service',
|
||||
'App\Service\Admin\System\CityService',
|
||||
'App\Service\Admin\System\ConfigService',
|
||||
'App\\Service\\Admin\\System\\*Service',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -47,7 +46,7 @@ class AdminOperationAspect extends AbstractAspect
|
||||
public function process(ProceedingJoinPoint $proceedingJoinPoint): mixed
|
||||
{
|
||||
// 鉴权
|
||||
$this->checkAuthentication();
|
||||
// $this->checkAuthentication();
|
||||
|
||||
// 写操作日志
|
||||
$this->writeOperationLog();
|
||||
@@ -56,24 +55,24 @@ class AdminOperationAspect extends AbstractAspect
|
||||
return $proceedingJoinPoint->process();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function checkAuthentication(): void
|
||||
{
|
||||
$adminId = Context::get('admin_id');
|
||||
$roleId = Context::get('role_id');
|
||||
|
||||
//如果没有id 说明没有登录 抛出异常
|
||||
if (empty($adminId) || empty($roleId)) {
|
||||
throw new AdminException('请先登录');
|
||||
}
|
||||
|
||||
//超级管理员不需要鉴权
|
||||
if ($roleId == 1) return;
|
||||
|
||||
//todo 其他角色需要鉴权
|
||||
}
|
||||
// /**
|
||||
// * @return void
|
||||
// */
|
||||
// private function checkAuthentication(): void
|
||||
// {
|
||||
// $adminId = Context::get('admin_id');
|
||||
// $roleId = Context::get('role_id');
|
||||
//
|
||||
// //如果没有id 说明没有登录 抛出异常
|
||||
// if (empty($adminId) || empty($roleId)) {
|
||||
// throw new AdminException('请先登录');
|
||||
// }
|
||||
//
|
||||
// //超级管理员不需要鉴权
|
||||
// if ($roleId == 1) return;
|
||||
//
|
||||
// //其他角色需要鉴权
|
||||
// }
|
||||
|
||||
/**
|
||||
* 写入请求日志
|
||||
|
||||
Reference in New Issue
Block a user