Просмотр исходного кода

优化 GroupsController 排序逻辑及代码格式修复

移除 `OrderByDescending` 方法以调整查询排序逻辑。
修复 `JsonView` 方法调用中参数间缺少空格的问题。
Lyyyi 1 месяц назад
Родитель
Сommit
93b96c277a
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      OASystem/OASystem.Api/Controllers/GroupsController.cs

+ 2 - 2
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -27268,7 +27268,6 @@ ORDER BY
             }
 
             var groups = await query
-                .GroupBy((x,y) => y.Id)
                 .OrderByDescending((x, y) => y.VisitDate)
                 .Select((x, y) => new 
                 {
@@ -27280,7 +27279,8 @@ ORDER BY
             var msg = "SUCCESS";
             if (total <= 0) msg = "暂无可操作的团组,请联系经理分配团组!";
 
-            return Ok(JsonView(true, msg, groups,total));
+
+            return Ok(JsonView(true, msg, groups, total));
         }
 
         /// <summary>