瀏覽代碼

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

- 移除了 create_time 的升序排列
- 将排序改为按 sort 字段降序排列
- 简化了排序规则以提高查询性能
shichen 2 月之前
父節點
當前提交
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
     }