|
|
@@ -207,24 +207,25 @@ class PurchaseService extends BaseService
|
|
|
ShopCouponClass::rollback($coupon);
|
|
|
}
|
|
|
|
|
|
+ // OrderClass::cancel($saleId) 中已经清理了
|
|
|
//清空限购缓存
|
|
|
- $order = OrderClass::getById($saleId, true);
|
|
|
- if (!empty($order)) {
|
|
|
- $customId = $order->customId ?? 0;
|
|
|
- $orderSn = $order->orderSn;
|
|
|
- if (!empty($customId)) {
|
|
|
- $orderItemList = OrderItemClass::getOrderItem($orderSn);
|
|
|
- if (!empty($orderItemList)) {
|
|
|
- foreach ($orderItemList as $item) {
|
|
|
- $productId = $item['productId'] ?? 0;
|
|
|
- $num = floor($item['num'] ?? 0);
|
|
|
- if (!empty($productId) && $num > 0) {
|
|
|
- ProductClass::baseClearLimitBuy($productId, $customId, $num);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // $order = OrderClass::getById($saleId, true);
|
|
|
+ // if (!empty($order)) {
|
|
|
+ // $customId = $order->customId ?? 0;
|
|
|
+ // $orderSn = $order->orderSn;
|
|
|
+ // if (!empty($customId)) {
|
|
|
+ // $orderItemList = OrderItemClass::getOrderItem($orderSn);
|
|
|
+ // if (!empty($orderItemList)) {
|
|
|
+ // foreach ($orderItemList as $item) {
|
|
|
+ // $productId = $item['productId'] ?? 0;
|
|
|
+ // $num = floor($item['num'] ?? 0);
|
|
|
+ // if (!empty($productId) && $num > 0) {
|
|
|
+ // ProductClass::baseClearLimitBuy($productId, $customId, $num);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
return $purchase;
|
|
|
}
|