public async Task <TData <List <ApiAuthorizeEntity> > > GetList(ApiAuthorizeListParam param) { var obj = new TData <List <ApiAuthorizeEntity> >(); obj.Data = await _apiAuthorizeService.GetList(param); obj.Tag = 1; return(obj); }
/// <summary> /// 根据url获取权限标识 /// </summary> public async Task <List <ApiAuthorizeEntity> > GetAuthorizeByUrl(string url = "") { var list = _cache.Get <List <ApiAuthorizeEntity> >(_cacheKey); if (list == null || list.Count() == 0) { list = await _apiAuthorizeService.GetList(null); _cache.Set(_cacheKey, list); } if (url.IsEmpty()) { return(list); } return(list.Where(a => a.Url.ToLower() == url.ToLower()).ToList()); }