Merge branch 'S06' into test
This commit is contained in:
commit
31d5cf9006
@ -54,4 +54,9 @@ public class TemplateContentDtoVo
|
|||||||
/// 轨迹节点
|
/// 轨迹节点
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Node { get; set; }
|
public string Node { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 排序键
|
||||||
|
/// </summary>
|
||||||
|
public int Sort { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -214,7 +214,8 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
|||||||
ContentCn = b.Content,
|
ContentCn = b.Content,
|
||||||
ContentEn = b.EnContent,
|
ContentEn = b.EnContent,
|
||||||
Status = c.Status,
|
Status = c.Status,
|
||||||
Node = d.NodeName
|
Node = d.NodeName,
|
||||||
|
Sort = a.Sort
|
||||||
})
|
})
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
@ -222,7 +223,8 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
|||||||
{
|
{
|
||||||
var templateContents = contents.Where(x => x.TemplateId == template.Id).ToList();
|
var templateContents = contents.Where(x => x.TemplateId == template.Id).ToList();
|
||||||
|
|
||||||
template.TemplateContents = templateContents;
|
//根据排序键排序
|
||||||
|
template.TemplateContents = templateContents.OrderBy(x => x.Sort).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
return templates;
|
return templates;
|
||||||
@ -262,10 +264,13 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
|||||||
ContentCn = b.Content,
|
ContentCn = b.Content,
|
||||||
ContentEn = b.EnContent,
|
ContentEn = b.EnContent,
|
||||||
Status = c.Status,
|
Status = c.Status,
|
||||||
Node = d.NodeName
|
Node = d.NodeName,
|
||||||
|
Sort = a.Sort
|
||||||
})
|
})
|
||||||
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||||
|
|
||||||
|
//返回轨迹模板内容时按排序键排序
|
||||||
|
contents.List = contents.List.OrderBy(x => x.Sort).ToList();
|
||||||
return contents;
|
return contents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user