李昊 4 年之前
父節點
當前提交
2b04617022
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      gx_api/GxPress/Service/GxPress.Service.Implement/Middle/MiddleService.cs

+ 2 - 2
gx_api/GxPress/Service/GxPress.Service.Implement/Middle/MiddleService.cs

@@ -820,8 +820,8 @@ namespace GxPress.Service.Implement.Middle
             query.WhereIn(nameof(Entity.Middle.Middle.RoleId), new List<int>() { 1, 3 });
             if (!string.IsNullOrWhiteSpace(request.KeyWord))
                 query.WhereLike(nameof(Entity.Middle.Middle.FolderName), $"%{request.KeyWord}%");
-            var middles = await _middleRepository.FindAsync(query.OrderByDesc(nameof(Entity.Middle.Middle.IsSystemDefault),
-                nameof(Entity.Middle.Middle.AttributeValue), nameof(Entity.Middle.Middle.IsTop), nameof(Entity.Middle.Middle.Sort)));
+            var orderByDesc = new string[] { nameof(Entity.Middle.Middle.IsSystemDefault), nameof(Entity.Middle.Middle.AttributeValue), nameof(Entity.Middle.Middle.IsTop), nameof(Entity.Middle.Middle.Sort) };
+            var middles = await _middleRepository.FindAsync(query.OrderByDesc(orderByDesc));
             List<MiddleSearchFolderResult> result = new List<MiddleSearchFolderResult>();
             foreach (var item in middles)
             {