查询客户端 用户拥有的菜单权限修改

dev
cjy 3 months ago
parent 6b558a78b0
commit 6dc6b77fa5

@ -56,7 +56,7 @@ public interface IUserService
/// 查询客户端 用户拥有的菜单权限
/// </summary>
/// <returns></returns>
public Task<DataResult<List<RouteItem>>> GetClientUserPermissions();
public Task<DataResult<List<RouteItem>>> GetClientUserPermissions(string id);
/// <summary>

@ -279,11 +279,11 @@ public class UserService : IUserService
/// 查询客户端 用户拥有的菜单权限
/// </summary>
/// <returns></returns>
public async Task<DataResult<List<RouteItem>>> GetClientUserPermissions()
public async Task<DataResult<List<RouteItem>>> GetClientUserPermissions(string id)
{
List<RouteItem> list = new List<RouteItem>();
var userId = long.Parse(user.UserId);
var userId = long.Parse(id);
var userInfo = await db.Queryable<SysUser>().Where(x => x.Id == userId).FirstAsync();

@ -105,9 +105,9 @@ public class UserController : ApiController
/// <returns></returns>
[HttpGet]
[Route("GetClientUserPermissions")]
public async Task<DataResult<List<RouteItem>>> GetClientUserPermissions()
public async Task<DataResult<List<RouteItem>>> GetClientUserPermissions([FromQuery] string id)
{
var res = await _invokeService.GetClientUserPermissions();
var res = await _invokeService.GetClientUserPermissions(id);
return res;
}
@ -118,6 +118,7 @@ public class UserController : ApiController
/// <returns></returns>
[HttpGet]
[Route("GetDataRuleListByPermission")]
[Obsolete]
public async Task<DataResult<List<DataRuleRes>>> GetDataRuleListByPermission([FromQuery] string permissionId)
{
var res = await _invokeService.GetDataRuleListByPermission(permissionId);

Loading…
Cancel
Save