feat 获取用户所有设备权限
This commit is contained in:
@@ -42,4 +42,15 @@ public class GainfoPermissionsController : ControllerBase
|
||||
{
|
||||
return await _gainfoPermissions.GetDevicesUnderGroupByUserNoAsync(userNo, deviceGroupCode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户所有设备权限
|
||||
/// </summary>
|
||||
/// <param name="userNo"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("assignDeviceCodes")]
|
||||
public async Task<List<Guid>> GetAssignDeviceCodesAsync(string userNo)
|
||||
{
|
||||
return await _gainfoPermissions.GetAssignDeviceCodesAsync(userNo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,4 +8,6 @@ public interface IGainfoPermissions : IScopeDependency
|
||||
Task<List<GetPlaceByGainfoResponse>> GetPlaceByGainfoAsync(string userNo);
|
||||
|
||||
Task<List<KeyValue<string>>> GetDevicesUnderGroupByUserNoAsync(string userNo, string deviceGroupCode);
|
||||
|
||||
Task<List<Guid>> GetAssignDeviceCodesAsync(string userNo);
|
||||
}
|
||||
|
||||
@@ -75,6 +75,11 @@ public class GainfoPermissions : IGainfoPermissions
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public Task<List<Guid>> GetAssignDeviceCodesAsync(string userNo)
|
||||
{
|
||||
return _devicePermissionService.GetAssignDeviceCodesAsync(userNo);
|
||||
}
|
||||
|
||||
private IEnumerable<Guid> RecursionGetNext(DeviceGroupEntity current, List<DeviceGroupEntity> deviceGroups)
|
||||
{
|
||||
var next = deviceGroups.Where(x => x.PCode == current.Code).ToList();
|
||||
|
||||
Reference in New Issue
Block a user