feat: 完善文章目录排序

This commit is contained in:
橙子
2023-12-16 14:36:12 +08:00
parent 9ee905c033
commit 2a6c754123

View File

@@ -15,7 +15,7 @@ namespace Yi.Framework.Bbs.SqlSugarCore.Repositories
public async Task<List<ArticleEntity>> GetTreeAsync(Expression<Func<ArticleEntity, bool>> where)
{
return await _DbQueryable.Where(where).ToTreeAsync(x => x.Children, x => x.ParentId, Guid.Empty);
return await _DbQueryable.Where(where).OrderBy(x=>x.CreationTime).ToTreeAsync(x => x.Children, x => x.ParentId, Guid.Empty);
}
}
}