@@ -192,7 +192,9 @@ class BookItemClass extends BaseClass
$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) {
util::unlock($cacheKey);
@@ -49,11 +49,9 @@ class NotifyClass extends BaseClass
$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