| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ResEntity> selectAllRes() { |
| | | return permsMapper.selectAllRes(); |
| | | } |
| | | |
| | | @Override |
| | | public List<MenusAuthEntity> selectMenus(String uid) { |
| | | String key = RedisCacheKey.permsMenusKey(uid); |
| | | Object obj = redisService.get(key); |
| | |
| | | return permsMapper.selectMenuRecursive(id, uid); |
| | | } |
| | | |
| | | /** |
| | | * 清除资源缓存 |
| | | */ |
| | | public void clearResCache() { |
| | | redisService.clearKeys(RedisCacheKey.permsResKey("")); |
| | | } |
| | | |
| | | /** |
| | | * 清除图层缓存 |
| | | */ |
| | | public void clearLayerCache() { |
| | | redisService.clearKeys(RedisCacheKey.permsLayerKey("")); |
| | | } |
| | | |
| | | /** |
| | | * 清除授权缓存 |
| | | */ |
| | | public void clearPermsCache() { |
| | | redisService.clearKeys(RedisCacheKey.permsRootKey()); |
| | | } |
| | | |
| | | /** |
| | | * 清除所有缓存 |
| | | */ |
| | | public void clearAllCache() { |
| | | redisService.clearAll(); |
| | | } |