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