|
|
@@ -0,0 +1,26 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace business\controllers;
|
|
|
+
|
|
|
+use biz\admin\services\AdminRoleAuthService;
|
|
|
+use biz\admin\services\AdminService;
|
|
|
+use common\components\util;
|
|
|
+use Yii;
|
|
|
+
|
|
|
+class AdminRoleAuthController extends BaseController
|
|
|
+{
|
|
|
+
|
|
|
+ //管理员角色权限 shish 2020.1.23
|
|
|
+ public function actionAuth()
|
|
|
+ {
|
|
|
+ $adminId = Yii::$app->request->get('adminId', 0);
|
|
|
+ $admin = AdminService::getById($adminId);
|
|
|
+ AdminService::valid($admin, $this->merchantId);
|
|
|
+ $roleId = $admin['roleId'];
|
|
|
+ $roleAuth = AdminRoleAuthService::getByCondition(['roleId' => $roleId, 'endId' => 1]);
|
|
|
+ $auth = isset($roleAuth['auth']) ? $roleAuth['auth'] : '';
|
|
|
+ $ids = !empty($auth) ? explode(',', $auth) : [];
|
|
|
+ util::success(['ids' => $ids]);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|