|
|
@@ -1963,14 +1963,15 @@ class ProductClass extends BaseClass
|
|
|
//创建限购缓存
|
|
|
$limitBuy = $data['limitBuy'] ?? 0;
|
|
|
if ($limitBuy > 0) {
|
|
|
+ $limitBuyClearType = $data['limitBuyClearType'];
|
|
|
$limitBuyClearLoopConfig = self::getLimitBuyClearLoopConfig($data);
|
|
|
- if (!empty($limitBuyClearLoopConfig)) {
|
|
|
+ if ($limitBuyClearType == 1 && !empty($limitBuyClearLoopConfig)) {
|
|
|
if ($type == 'ghs') {
|
|
|
self::createRecurringLimitBuyCache($id, $limitBuyClearLoopConfig['intervalDays'], $limitBuyClearLoopConfig['clearHour']);
|
|
|
} else {
|
|
|
\bizHd\product\classes\ProductClass::createRecurringLimitBuyCache($id, $limitBuyClearLoopConfig['intervalDays'], $limitBuyClearLoopConfig['clearHour']);
|
|
|
}
|
|
|
- } elseif (isset($data['limitBuyClearTime']) && $data['limitBuyClearTime'] != '') {
|
|
|
+ } elseif ($limitBuyClearType == 2 && isset($data['limitBuyClearTime']) && $data['limitBuyClearTime'] != '') {
|
|
|
$limitBuyClearTime = strtotime($data['limitBuyClearTime']);
|
|
|
if ($limitBuyClearTime > time()) {
|
|
|
if ($type == 'ghs') {
|