|
|
|
@ -19,7 +19,8 @@ namespace Myshipping.Core.Service;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 用户数据范围
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class SysDataUserMenuService : ISysDataUserMenu, ITransient
|
|
|
|
|
[ApiDescriptionSettings(Name = "SysDataUserMenu", Order = 150)]
|
|
|
|
|
public class SysDataUserMenuService : ISysDataUserMenu, IDynamicApiController,ITransient
|
|
|
|
|
{
|
|
|
|
|
private readonly SqlSugarRepository<SysDataUserMenu> _rep; // 用户数据范围表仓储
|
|
|
|
|
private readonly ISysCacheService _sysCache;//缓存
|
|
|
|
@ -37,6 +38,32 @@ public class SysDataUserMenuService : ISysDataUserMenu, ITransient
|
|
|
|
|
_sysOrgRep= sysOrgRep;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取权限
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="userid"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/SysDataUserMenu/GetGrantData")]
|
|
|
|
|
public async Task<dynamic> GetGrantData(long userid) {
|
|
|
|
|
|
|
|
|
|
return await _rep.AsQueryable().Where(x => x.SysUserId == userid).ToListAsync();
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取用户自定义权限
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="userid"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/SysDataUserMenu/GetGrantData")]
|
|
|
|
|
public async Task<dynamic> GetGrantRightData(long userid)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
return await _sysUserDataScopeRep.AsQueryable().Where(x => x.SysUserId == userid).ToListAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 授权用户数据
|
|
|
|
|
/// </summary>
|
|
|
|
|