Dun.Jason 1 년 전
부모
커밋
84a8c4db3c
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src/Hotline.Api/Controllers/Bi/BiOrderController.cs

+ 6 - 0
src/Hotline.Api/Controllers/Bi/BiOrderController.cs

@@ -256,6 +256,12 @@ namespace Hotline.Api.Controllers.Bi
                     query = dto.SortRule == 0 ? query.OrderBy(x => x.Subtotal) : query.OrderByDescending(x => x.Subtotal);
                     break;
             }
+
+            if (string.IsNullOrEmpty(dto.SortField))
+            {
+                query = query.OrderByDescending(x => x.Subtotal);
+            }
+
             var (total, items) = await query.Where(x => (x.CentreArchive + x.CentreCareOf + x.Invalid + x.Repeat) != 0).ToPagedListAsync(dto, HttpContext.RequestAborted);
             return new PagedDto<OrderBiCentreDataListVo>(total, items);
         }