|
|
@@ -3,11 +3,20 @@
|
|
|
namespace biz\auth\services;
|
|
|
|
|
|
use biz\base\services\BaseService;
|
|
|
+use common\components\tree;
|
|
|
use Yii;
|
|
|
|
|
|
class AuthService extends BaseService
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
public static $baseFile = '\biz\auth\classes\AuthClass';
|
|
|
+
|
|
|
+ //根据业务端获取权限树
|
|
|
+ public static function getTree($endId)
|
|
|
+ {
|
|
|
+ $data = self::getAllByCondition(['endId' => $endId], null, '*');
|
|
|
+ $tree = tree::makeTree($data, ['primary_key' => 'id', 'parent_key' => 'parentId', 'children_key' => 'children',]);
|
|
|
+ return $tree;
|
|
|
+ }
|
|
|
|
|
|
}
|