Sfoglia il codice sorgente

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

- 移除了 create_time 的重复排序条件
- 保留了 sort 字段的降序排列
- 简化了查询排序规则以提高性能
shichen 2 mesi fa
parent
commit
f3b3ef64b0
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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 DESC ,create_time DESC');
171
+            $query->order('sort DESC');
172 172
         });
173 173
         return $query;
174 174
     }