|
@@ -1163,11 +1163,11 @@ class ProductService extends Service
|
|
|
//先根据大类分类排序 然后再根据子类分类排序 然后再根据产品属性排序
|
|
|
$model = $model->orderByRaw("CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(product_category, ',', 1), '[', -1) AS UNSIGNED)")
|
|
|
->orderByRaw("CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(product_category, ',', 2), ',', -1) AS UNSIGNED)")
|
|
|
- ->orderByDesc('item_code')
|
|
|
- ->orderByDesc('product_attribute');
|
|
|
+ ->orderByDesc('product_attribute')
|
|
|
+ ->orderByDesc('item_code');
|
|
|
}else{
|
|
|
- $model = $model->orderByDesc('item_code')
|
|
|
- ->orderByDesc('product_attribute');
|
|
|
+ $model = $model->orderByDesc('product_attribute')
|
|
|
+ ->orderByDesc('item_code');
|
|
|
}
|
|
|
|
|
|
if(! empty($data['title_t'])) {
|