fix 引用更新
This commit is contained in:
@@ -15,7 +15,7 @@ public class TenantAssignTypeDeviceCode
|
||||
/// <summary>
|
||||
/// 设备权限
|
||||
/// </summary>
|
||||
public IEnumerable<AssignTypeDeviceCode> AssignTypes { get; init; }
|
||||
public List<AssignTypeDeviceCode> AssignTypes { get; init; }
|
||||
}
|
||||
|
||||
public class AssignTypeDeviceCode
|
||||
@@ -35,10 +35,10 @@ public class AssignTypeDeviceCode
|
||||
/// <summary>
|
||||
/// 权限
|
||||
/// </summary>
|
||||
public IEnumerable<Guid> Codes { get; set; }
|
||||
public List<Guid> Codes { get; set; }
|
||||
|
||||
|
||||
public IEnumerable<Guid> OriginalCodes { get; set; }
|
||||
public List<Guid> OriginalCodes { get; set; }
|
||||
}
|
||||
|
||||
public class UserTenantDeviceCodeDto
|
||||
|
||||
@@ -248,9 +248,9 @@ public class DevicePermissionAnalyzeService : IDevicePermissionAnalyzeService
|
||||
AssignType = p.Key.AssignType,
|
||||
AssignValue = p.Key.AssignValue,
|
||||
UniqueType = p.Key.UniqueType,
|
||||
Codes = p.SelectMany(xx => xx.Codes),
|
||||
OriginalCodes = p.Where(xx => xx.OriginalCodes.IsPresent()).SelectMany(xx => xx.OriginalCodes)
|
||||
})
|
||||
Codes = p.SelectMany(xx => xx.Codes).ToList(),
|
||||
OriginalCodes = p.Where(xx => xx.OriginalCodes.IsPresent()).SelectMany(xx => xx.OriginalCodes).ToList()
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
return dto;
|
||||
@@ -299,8 +299,8 @@ public class DevicePermissionAnalyzeService : IDevicePermissionAnalyzeService
|
||||
AssignType = xx.Key.AssignType,
|
||||
AssignValue = xx.Key.AssignValue,
|
||||
UniqueType = uniqueType,
|
||||
Codes = xx.Select(xxx => xxx.UniqueValue)
|
||||
})
|
||||
Codes = xx.Select(xxx => xxx.UniqueValue).ToList()
|
||||
}).ToList()
|
||||
})
|
||||
.ToList();
|
||||
|
||||
@@ -318,7 +318,7 @@ public class DevicePermissionAnalyzeService : IDevicePermissionAnalyzeService
|
||||
|
||||
nextItems = nextItems.Distinct().ToList();
|
||||
assignTypeDeviceCodeItem.OriginalCodes = nextItems;
|
||||
assignTypeDeviceCodeItem.Codes = deviceGroupRelationships.Where(x => nextItems.Contains(x.GroupCode)).Select(x => x.DeviceCode);
|
||||
assignTypeDeviceCodeItem.Codes = deviceGroupRelationships.Where(x => nextItems.Contains(x.GroupCode)).Select(x => x.DeviceCode).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user