Merge branch 'S06' into test

This commit is contained in:
hardstylewyl 2024-12-27 16:01:13 +08:00
commit 31d5cf9006
2 changed files with 13 additions and 3 deletions

View File

@ -54,4 +54,9 @@ public class TemplateContentDtoVo
/// 轨迹节点
/// </summary>
public string Node { get; set; }
/// <summary>
/// 排序键
/// </summary>
public int Sort { get; set; }
}

View File

@ -214,7 +214,8 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
ContentCn = b.Content,
ContentEn = b.EnContent,
Status = c.Status,
Node = d.NodeName
Node = d.NodeName,
Sort = a.Sort
})
.ToListAsync();
@ -222,7 +223,8 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
{
var templateContents = contents.Where(x => x.TemplateId == template.Id).ToList();
template.TemplateContents = templateContents;
//根据排序键排序
template.TemplateContents = templateContents.OrderBy(x => x.Sort).ToList();
}
return templates;
@ -262,10 +264,13 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
ContentCn = b.Content,
ContentEn = b.EnContent,
Status = c.Status,
Node = d.NodeName
Node = d.NodeName,
Sort = a.Sort
})
.ToPagedListAsync(input.PageIndex, input.PageSize);
//返回轨迹模板内容时按排序键排序
contents.List = contents.List.OrderBy(x => x.Sort).ToList();
return contents;
}