|
|
@@ -11,24 +11,24 @@ class AuthService extends BaseService
|
|
|
|
|
|
public static $baseFile = '\biz\auth\classes\AuthClass';
|
|
|
|
|
|
- //根据业务端获取权限树
|
|
|
+ //获取指定业务端的权限列表 shish 2019.11.24
|
|
|
+ public static function getList($endId)
|
|
|
+ {
|
|
|
+ return self::getAllByCondition(['endId' => $endId], null, '*');
|
|
|
+ }
|
|
|
+
|
|
|
+ //获取指定业务端的权限树
|
|
|
public static function getTree($endId)
|
|
|
{
|
|
|
- $data = self::getAllByCondition(['endId' => $endId], null, '*');
|
|
|
+ $data = self::getList($endId);
|
|
|
$tree = tree::makeTree($data, ['primary_key' => 'id', 'parent_key' => 'parentId', 'children_key' => 'children',]);
|
|
|
return $tree;
|
|
|
}
|
|
|
-
|
|
|
- //取出业务端所有的权限 shish 2019.11.24
|
|
|
- public static function getAuthData($endId)
|
|
|
- {
|
|
|
- return self::getAllByCondition(['endId' => $endId], null, '*');
|
|
|
- }
|
|
|
|
|
|
//获取业务商所有权限名称 shish 2019.11.24
|
|
|
public static function getNameList($endId)
|
|
|
{
|
|
|
- $list = self::getAuthData($endId);
|
|
|
+ $list = self::getList($endId);
|
|
|
$arr = [];
|
|
|
if (!empty($list)) {
|
|
|
$arr = array_column($list, 'authName');
|