Преглед изворни кода

fix(product): 移除产品随机排序功能

- 移除了RAND()随机排序选项
- 保留按sort字段降序排列的功能
- 修复了产品列表排序逻辑的一致性问题
shichen пре 2 месеци
родитељ
комит
f92310fbf8
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 DESC, RAND()');
171
+            $query->order('sort DESC');
172
         });
172
         });
173
         return $query;
173
         return $query;
174
     }
174
     }