Dun.Jason 1 year ago
parent
commit
84a8c4db3c
1 changed files with 6 additions and 0 deletions
  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);
         }