protected override List <GrantScope> LoadData() { Tauth_ScopeCollection daScopeColl = new Tauth_ScopeCollection(); daScopeColl.ListAll(); var list = MapProvider.Map <GrantScope>(daScopeColl.DataTable); return(list); }
/// <summary> /// 获取作用域权限列表,GROUP转换为API,仅返回API /// </summary> /// <param name="scopeCodes"></param> /// <returns></returns> public static List <ScopeApi> GetScopeApis(params string[] scopeCodes) { Tauth_ScopeCollection daScopeCollection = new Tauth_ScopeCollection(); daScopeCollection.ListByScopes(scopeCodes); if (daScopeCollection.Count <= 0) { return(null); } List <GrantScope> list = MapProvider.Map <GrantScope>(daScopeCollection.DataTable); var scopeids = list.Select(it => it.SCOPE_ID); return(GetScopeApis(scopeids.ToArray())); }