fix 返回Editable
This commit is contained in:
@@ -23,6 +23,11 @@ public class GainfoGroupTreeResponse
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Remark { get; set; }
|
public string Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否编辑
|
||||||
|
/// </summary>
|
||||||
|
public bool Editable { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string TenantId { get; set; }
|
public string TenantId { get; set; }
|
||||||
|
|||||||
@@ -22,14 +22,14 @@ public class GainfoGroupService : IGainfoGroupService
|
|||||||
|
|
||||||
public async Task<List<GainfoGroupTreeResponse>> GetTreeAsync()
|
public async Task<List<GainfoGroupTreeResponse>> GetTreeAsync()
|
||||||
{
|
{
|
||||||
var deviceGroups = await _dbContext.Queryable<GainfoGroupEntity>()
|
var gainfoGroups = await _dbContext.Queryable<GainfoGroupEntity>()
|
||||||
.Select<GainfoGroupTreeResponse>()
|
.Select<GainfoGroupTreeResponse>()
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
var tops = deviceGroups.Where(x => !x.PCode.HasValue).ToList();
|
var tops = gainfoGroups.Where(x => !x.PCode.HasValue).ToList();
|
||||||
tops.ForEach(x =>
|
tops.ForEach(x =>
|
||||||
{
|
{
|
||||||
RecursionGetNext(x, deviceGroups);
|
RecursionGetNext(x, gainfoGroups);
|
||||||
});
|
});
|
||||||
|
|
||||||
return tops;
|
return tops;
|
||||||
|
|||||||
Reference in New Issue
Block a user