123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using Furion.JsonSerialization;
- using YBEE.EQM.Core;
- namespace YBEE.EQM.Application
- {
- public interface ICacheService
- {
- Task AddCacheKey(string cacheKey);
- Task DelByPatternAsync(string key);
- Task DelCacheKey(string cacheKey);
- bool Exists(string cacheKey);
- Task<List<string>> GetAllCacheKeys();
- Task<T> GetAsync<T>(string cacheKey);
- Task<List<int>> GetDataScope(int userId);
- Task<List<string>> GetPermission(int userId);
- Task RemovePermission(int userId);
- Task<string> GetStringAsync(string cacheKey);
- Task RemoveAsync(string key);
- Task SetAsync(string cacheKey, object value);
- Task SetDataScope(int userId, List<int> dataScopes);
- Task SetPermission(int userId, List<string> permissions);
- Task SetStringAsync(string cacheKey, string value);
- Task<List<AntMenuOutput>> GetMenu(int userId);
- Task SetMenu(int userId, List<AntMenuOutput> menus);
- /// <summary>
- /// 获取角色数据范围权限缓存
- /// </summary>
- /// <param name="userId"></param>
- /// <returns></returns>
- Task<List<SysRoleOutput>> GetRoleDataScope(int userId);
- /// <summary>
- /// 删除角色数据范围权限缓存
- /// </summary>
- /// <param name="userId"></param>
- /// <returns></returns>
- Task RemoveRoleDataScope(int userId);
- /// <summary>
- /// 缓存角色数据范围权限
- /// </summary>
- /// <param name="userId"></param>
- /// <param name="roles"></param>
- /// <returns></returns>
- Task SetRoleDataScope(int userId, List<SysRoleOutput> roles);
- }
- }
|