shish 4 gadi atpakaļ
vecāks
revīzija
4ab0251e34

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

@@ -76,7 +76,7 @@ class OrderItemController extends BaseController
         $get = Yii::$app->request->get();
         $productId = $get['productId'] ?? 0;
         $product = ProductClass::getById($productId, true);
-        ProductClass::check($product, $this->shopId);
+        ProductClass::check($product, $this->mainId);
         $where = ['shopId' => $this->shopId, 'productId' => $productId];
         $respond = OrderItemClass::getOrderInfoList($where);
         util::success($respond);

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

@@ -490,12 +490,12 @@ class ProductClass extends BaseClass
         }
     }
 
-    public static function check($info, $shopId)
+    public static function check($info, $mainId)
     {
         if (empty($info)) {
             util::fail('没有花材信息');
         }
-        if (isset($info->shopId) == false || $info->shopId != $shopId) {
+        if (isset($info->mainId) == false || $info->mainId != $mainId) {
             util::fail('无效花材');
         }
         return true;