public async Task <TData <List <MenuAuthorizeEntity> > > GetList(MenuAuthorizeListParam param) { var obj = new TData <List <MenuAuthorizeEntity> >(); obj.Data = await _menuAuthorizeService.GetList(param); obj.Tag = 1; return(obj); }
/// <summary> /// 查询缓存中的权限 /// </summary> public async Task <List <MenuAuthorizeEntity> > GetMenyAuthorizeList() { var cacheList = _cache.Get <List <MenuAuthorizeEntity> >(MenuAuthorizeCacheKey); if (cacheList == null || cacheList.Count() == 0) { cacheList = await _menuAuthorizeService.GetList(null); _cache.Set(MenuAuthorizeCacheKey, cacheList); } return(cacheList); }