shish 4 tahun lalu
induk
melakukan
7aad92de2e

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

@@ -486,10 +486,8 @@ class OrderController extends BaseController
         try {
         try {
             $post['product'] = $productList;
             $post['product'] = $productList;
 
 
-
             //阿东开5支老是会出现5扎情况跟踪
             //阿东开5支老是会出现5扎情况跟踪
-            ProductClass::adStockCheck($this->shop, $this->mainId, $productList);
-
+            ProductClass::adStockCheck($this->shop, $productList);
 
 
             $return = OrderService::createFinishOrder($post, $custom, $hasPay);
             $return = OrderService::createFinishOrder($post, $custom, $hasPay);
             $transaction->commit();
             $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 $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扎情况跟踪
         //阿东开5支老是会出现5扎情况跟踪
+        $mainId = $shop->mainId ?? 0;
         if (!empty($productList) && $mainId == 644) {
         if (!empty($productList) && $mainId == 644) {
             $adIds = [];
             $adIds = [];
             foreach ($productList as $adItem) {
             foreach ($productList as $adItem) {
@@ -30,7 +28,8 @@ class ProductClass extends BaseClass
                 if (!empty($arr)) {
                 if (!empty($arr)) {
                     foreach ($arr as $it) {
                     foreach ($arr as $it) {
                         if (isset($it['scanNum']) && $it['scanNum'] > 0) {
                         if (isset($it['scanNum']) && $it['scanNum'] > 0) {
-
+                            $name = $it['name'] ?? '';
+                            noticeUtil::push('刚刚,花材:' . $name . ',5支被开成了5扎,请注意!!!', '15280215347');
                         }
                         }
                     }
                     }
                 }
                 }