李昊 4 年之前
父节点
当前提交
eb625efd5b

+ 1 - 1
gx_api/GxPress/Repository/GxPress.Repository.Implement/Group/GroupCategoryRepository.cs

@@ -96,7 +96,7 @@ namespace GxPress.Repository.Implement.Group
         /// <returns></returns>
         public async Task<IEnumerable<GroupCategoryResult>> GetAllAsync(int parentId)
         {
-            var result = await _repository.GetAllAsync<GroupCategoryResult>(Q.Where(nameof(Entity.tede2.Group.GroupCategory.ParentId), parentId));
+            var result = await _repository.GetAllAsync<GroupCategoryResult>(Q.Where(nameof(Entity.tede2.Group.GroupCategory.ParentId), parentId).OrderByDesc(nameof(Entity.tede2.Group.GroupCategory.CreatedDate)));
             foreach (var item in result)
             {
                 item.IsChildren = await _repository.ExistsAsync(Q.Where(nameof(Entity.tede2.Group.GroupCategory.ParentId), item.Id));