林琦海 vor 5 Jahren
Ursprung
Commit
ffb0ed623f

+ 1 - 1
app-ghs/controllers/ProductController.php

@@ -53,7 +53,7 @@ class ProductController extends BaseController
         }
         $where['shopId'] = $shopId;
 
-        $itemInfoData = ProductClass::getAllByCondition($where, null, "*");
+        $itemInfoData = ProductClass::getAllByCondition($where, ['actualSold'=>SORT_DESC,'inTurn'=>SORT_DESC], "*");
         $itemInfoData = ProductClass::groupProductInfo($itemInfoData);
         //常用的itemIds
         $oftenItemIds = ProductClass::getOftenItemIds($shopId);

+ 1 - 1
app-hd/controllers/GhsProductController.php

@@ -32,7 +32,7 @@ class GhsProductController extends BaseController
         $where['sjId'] = $sjId;
         $where['shopId'] = $shopId;
 
-        $itemInfoData = ProductClass::getAllByCondition($where,null,"*");
+        $itemInfoData = ProductClass::getAllByCondition($where,['actualSold'=>SORT_DESC,'inTurn'=>SORT_DESC],"*");
         $itemInfoData = ProductClass::groupProductInfo($itemInfoData);
         //常用的itemIds
         $oftenItemIds = ProductClass::getOftenItemIds($shopId);

+ 1 - 1
app-hd/controllers/ProductController.php

@@ -47,7 +47,7 @@ class ProductController extends BaseController
         }
         $where['shopId'] = $shopId;
 
-        $itemInfoData = ProductClass::getAllByCondition($where, null, "*");
+        $itemInfoData = ProductClass::getAllByCondition($where, ['actualSold'=>SORT_DESC,'inTurn'=>SORT_DESC], "*");
         $itemInfoData = ProductClass::groupProductInfo($itemInfoData);
         //常用的itemIds
         $oftenItemIds = ProductClass::getOftenItemIds($shopId);

+ 1 - 1
biz-ghs/product/classes/ProductClass.php

@@ -178,7 +178,7 @@ class ProductClass extends BaseClass
     //获取常用的itemIds
     public static function getOftenItemIds($shopId)
     {
-        $data = self::getLimitList("itemId", ['shopId' => $shopId], 10, 'actualSold desc');
+        $data = self::getLimitList("itemId", ['shopId' => $shopId], 10, ['actualSold'=>SORT_DESC,'inTurn'=>SORT_DESC]);
         if ($data) {
             $data = array_column($data, 'itemId');
         }