This commit is contained in:
@@ -30,10 +30,10 @@ namespace Dilon.Core.Service
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<long>> GetDataScope(long userId)
|
||||
public async Task<List<string>> GetDataScope(string userId)
|
||||
{
|
||||
var cacheKey = CommonConst.CACHE_KEY_DATASCOPE + $"{userId}";
|
||||
return await _cache.GetAsync<List<long>>(cacheKey);
|
||||
return await _cache.GetAsync<List<string>>(cacheKey);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -43,7 +43,7 @@ namespace Dilon.Core.Service
|
||||
/// <param name="dataScopes"></param>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
public async Task SetDataScope(long userId, List<long> dataScopes)
|
||||
public async Task SetDataScope(string userId, List<string> dataScopes)
|
||||
{
|
||||
var cacheKey = CommonConst.CACHE_KEY_DATASCOPE + $"{userId}";
|
||||
await _cache.SetAsync(cacheKey, dataScopes);
|
||||
@@ -55,7 +55,7 @@ namespace Dilon.Core.Service
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="appCode"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<AntDesignTreeNode>> GetMenu(long userId, string appCode)
|
||||
public async Task<List<AntDesignTreeNode>> GetMenu(string userId, string appCode)
|
||||
{
|
||||
var cacheKey = CommonConst.CACHE_KEY_MENU + $"{userId}-{appCode}";
|
||||
return await _cache.GetAsync<List<AntDesignTreeNode>>(cacheKey);
|
||||
@@ -69,7 +69,7 @@ namespace Dilon.Core.Service
|
||||
/// <param name="menus"></param>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
public async Task SetMenu(long userId, string appCode, List<AntDesignTreeNode> menus)
|
||||
public async Task SetMenu(string userId, string appCode, List<AntDesignTreeNode> menus)
|
||||
{
|
||||
var cacheKey = CommonConst.CACHE_KEY_MENU + $"{userId}-{appCode}";
|
||||
await _cache.SetAsync(cacheKey, menus);
|
||||
@@ -80,7 +80,7 @@ namespace Dilon.Core.Service
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<string>> GetPermission(long userId)
|
||||
public async Task<List<string>> GetPermission(string userId)
|
||||
{
|
||||
var cacheKey = CommonConst.CACHE_KEY_PERMISSION + $"{userId}";
|
||||
return await _cache.GetAsync<List<string>>(cacheKey);
|
||||
@@ -93,7 +93,7 @@ namespace Dilon.Core.Service
|
||||
/// <param name="permissions"></param>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
public async Task SetPermission(long userId, List<string> permissions)
|
||||
public async Task SetPermission(string userId, List<string> permissions)
|
||||
{
|
||||
var cacheKey = CommonConst.CACHE_KEY_PERMISSION + $"{userId}";
|
||||
await _cache.SetAsync(cacheKey, permissions);
|
||||
|
||||
Reference in New Issue
Block a user