Ver código fonte

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

- 将排序规则从降序改为升序
- 统一排序字段为 sort ASC 和 create_time ASC
- 解决产品列表展示顺序异常问题
shichen 2 meses atrás
pai
commit
b8da21655d
1 arquivos alterados com 1 adições e 1 exclusões
  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 ASC ,create_time ASC');
172 172
         });
173 173
         return $query;
174 174
     }