|
|
|
@ -162,18 +162,18 @@ public class SysDataUserMenuService : ISysDataUserMenu, IDynamicApiController, I
|
|
|
|
|
|
|
|
|
|
List<SysDataUserMenu> list = new List<SysDataUserMenu>();
|
|
|
|
|
List<long> datascope = new List<long>();
|
|
|
|
|
//if (_sysCache.Exists(CommonConst.CACHE_KEY_USERDATASCOPE))
|
|
|
|
|
//{
|
|
|
|
|
// list = await _sysCache.GetAsync<List<SysDataUserMenu>>(CommonConst.CACHE_KEY_USERDATASCOPE);
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// list = await _rep.AsQueryable().ToListAsync();
|
|
|
|
|
// _sysCache.Set(CommonConst.CACHE_KEY_USERDATASCOPE, list);
|
|
|
|
|
//}
|
|
|
|
|
list = await _rep.AsQueryable().ToListAsync();
|
|
|
|
|
_sysCache.Set(CommonConst.CACHE_KEY_USERDATASCOPE, list);
|
|
|
|
|
if (_sysCache.Exists(CommonConst.CACHE_KEY_USERDATASCOPE))
|
|
|
|
|
{
|
|
|
|
|
list = await _sysCache.GetAsync<List<SysDataUserMenu>>(CommonConst.CACHE_KEY_USERDATASCOPE);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
list = await _rep.AsQueryable().ToListAsync();
|
|
|
|
|
_sysCache.Set(CommonConst.CACHE_KEY_USERDATASCOPE, list);
|
|
|
|
|
}
|
|
|
|
|
//list = await _rep.AsQueryable().ToListAsync();
|
|
|
|
|
//_sysCache.Set(CommonConst.CACHE_KEY_USERDATASCOPE, list);
|
|
|
|
|
DataScopeType _dataScopeType = list.Where(x => x.SysMenuId == menuid && x.SysUserId == UserManager.UserId).Select(x => x.DataScopeType).FirstOrDefault();
|
|
|
|
|
if (_dataScopeType == DataScopeType.ALL)
|
|
|
|
|
{
|
|
|
|
|