|
|
@@ -562,7 +562,7 @@ class ProductClass extends BaseClass
|
|
|
}
|
|
|
|
|
|
//清空限购的缓存
|
|
|
- public static function clearLimitBuyCache($productId)
|
|
|
+ public static function clearLimitBuyCache($productId, $clearAll = true)
|
|
|
{
|
|
|
$limitKey = self::LIMIT_BUY_KEY . $productId;
|
|
|
$arr = Yii::$app->redis->executeCommand('HKEYS', [$limitKey]);
|
|
|
@@ -571,8 +571,10 @@ class ProductClass extends BaseClass
|
|
|
self::baseClearLimitBuy($productId, $field);
|
|
|
}
|
|
|
}
|
|
|
- self::clearLimitBuyClearMark($productId);
|
|
|
- self::clearLimitBuyClearLoopConfig($productId);
|
|
|
+ if ($clearAll === true) {
|
|
|
+ self::clearLimitBuyClearMark($productId);
|
|
|
+ self::clearLimitBuyClearLoopConfig($productId);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public static function getHasLimitBuyList($product)
|