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

fix(product): 修正产品排序逻辑

- 移除了 create_time 的升序排列
- 将排序改为按 sort 字段降序排列
- 简化了排序规则以提高查询性能
shichen месяцев назад: 2
Родитель
Сommit
e699c764f8
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/common/dao/store/product/ProductDao.php

+ 1 - 1
app/common/dao/store/product/ProductDao.php

@@ -168,7 +168,7 @@ class ProductDao extends BaseDao
168 168
                 $query->order('rank DESC ,create_time DESC');
169 169
             });
170 170
         },function ($query){
171
-            $query->order('sort ASC ,create_time ASC');
171
+            $query->order('sort DESC');
172 172
         });
173 173
         return $query;
174 174
     }