Переглянути джерело

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
                 $query->order('rank DESC ,create_time DESC');
168
                 $query->order('rank DESC ,create_time DESC');
169
             });
169
             });
170
         },function ($query){
170
         },function ($query){
171
-            $query->order('sort ASC ,create_time ASC');
171
+            $query->order('sort DESC');
172
         });
172
         });
173
         return $query;
173
         return $query;
174
     }
174
     }