| | |
| | | import java.util.List; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * 授权服务 |
| | | * @author WWW |
| | | */ |
| | | @Service |
| | | @SuppressWarnings("ALL") |
| | | public class PermsService implements PermsMapper { |
| | | @Resource |
| | | PermsMapper permsMapper; |
| | |
| | | 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(); |
| | | } |