Bläddra i källkod

预订变化通知

shish 2 år sedan
förälder
incheckning
327edf8b03
1 ändrade filer med 5 tillägg och 4 borttagningar
  1. 5 4
      biz-ghs/book/classes/BookItemClass.php

+ 5 - 4
biz-ghs/book/classes/BookItemClass.php

@@ -135,6 +135,11 @@ class BookItemClass extends BaseClass
             }
             $bookCustomRes = BookCustomChangeClass::delBookNum($bookCustomRes, $num, $order, $shop, $product, $params);
 
+            //预订变化通知 ssh 20240820
+            $noticeText = json_encode(['orderId' => $orderId,'customName'=>$customName,'customId'=>$customId,'itemId'=>$itemId,'itemName'=>$name,'io'=>0,'num'=>$num,'shopId'=>$shopId]);
+            $noticeKey = "bookChangeNoticeStaff";
+            Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
+
             $firstRemainSubNum = 0;
             if ($bookItemCustomRes->needCgNum >= $num) {
                 //待采数量足够扣
@@ -198,10 +203,6 @@ class BookItemClass extends BaseClass
             $bookItemRes->save();
             $bookCustomRes->save();
             util::unlock($cacheKey);
-
-            $noticeText = json_encode(['orderId' => $orderId,'customName'=>$customName,'customId'=>$customId,'itemId'=>$itemId,'itemName'=>$name,'io'=>0,'num'=>$num,'shopId'=>$shopId]);
-            $noticeKey = "bookChangeNoticeStaff";
-            Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
         }
     }