shish hace 2 años
padre
commit
ac89ca4661

+ 3 - 1
biz-ghs/book/classes/BookItemClass.php

@@ -192,7 +192,9 @@ class BookItemClass extends BaseClass
             $bookCustomRes = BookCustomClass::delOnNum($bookCustomRes, $thirdNeedSubNum, $num, $order, $shop, $product, $params);
             $bookCustomRes = BookCustomClass::delOnNum($bookCustomRes, $thirdNeedSubNum, $num, $order, $shop, $product, $params);
 
 
             //预订减少造成下架而产生通知
             //预订减少造成下架而产生通知
-            NotifyClass::bookReduceOutItem($bookItemCustomRes, $thirdNeedSubNum, $shop);
+            if($thirdNeedSubNum>0){
+                NotifyClass::bookReduceOutItem($bookItemCustomRes, $thirdNeedSubNum, $shop);
+            }
 
 
             if ($thirdRemainSubNum <= 0) {
             if ($thirdRemainSubNum <= 0) {
                 util::unlock($cacheKey);
                 util::unlock($cacheKey);

+ 3 - 5
biz-ghs/notify/classes/NotifyClass.php

@@ -49,11 +49,9 @@ class NotifyClass extends BaseClass
                 $staff->save();
                 $staff->save();
             }
             }
         }
         }
-        if ($num > 0) {
-            $noticeText = json_encode(['id' => $id, 'num' => $num, 'shopId' => $shopId]);
-            $noticeKey = "bookChangeOffItem";
-            Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
-        }
+        $noticeText = json_encode(['id' => $id, 'num' => $num, 'shopId' => $shopId]);
+        $noticeKey = "bookChangeOffItem";
+        Yii::$app->redis->executeCommand('LPUSH', [$noticeKey, $noticeText]);
     }
     }
 
 
     //新增售后申请通过 ssh 20230814
     //新增售后申请通过 ssh 20230814