shish 3 лет назад
Родитель
Сommit
7aad92de2e
2 измененных файлов с 5 добавлено и 8 удалено
  1. 1 3
      app-hd/controllers/OrderController.php
  2. 4 5
      biz-hd/product/classes/ProductClass.php

+ 1 - 3
app-hd/controllers/OrderController.php

@@ -486,10 +486,8 @@ class OrderController extends BaseController
         try {
             $post['product'] = $productList;
 
-
             //阿东开5支老是会出现5扎情况跟踪
-            ProductClass::adStockCheck($this->shop, $this->mainId, $productList);
-
+            ProductClass::adStockCheck($this->shop, $productList);
 
             $return = OrderService::createFinishOrder($post, $custom, $hasPay);
             $transaction->commit();

+ 4 - 5
biz-hd/product/classes/ProductClass.php

@@ -12,12 +12,10 @@ class ProductClass extends BaseClass
 
     public static $baseFile = '\bizHd\product\models\Product';
 
-    public static function adStockCheck($shop, $mainId, $productList)
+    public static function adStockCheck($shop, $productList)
     {
-
-        noticeUtil::push('刚刚,花材:{s16},5支被开成了5扎,请注意!!!', '15280215347');
-
         //阿东开5支老是会出现5扎情况跟踪
+        $mainId = $shop->mainId ?? 0;
         if (!empty($productList) && $mainId == 644) {
             $adIds = [];
             foreach ($productList as $adItem) {
@@ -30,7 +28,8 @@ class ProductClass extends BaseClass
                 if (!empty($arr)) {
                     foreach ($arr as $it) {
                         if (isset($it['scanNum']) && $it['scanNum'] > 0) {
-
+                            $name = $it['name'] ?? '';
+                            noticeUtil::push('刚刚,花材:' . $name . ',5支被开成了5扎,请注意!!!', '15280215347');
                         }
                     }
                 }