From 764284256e070ea3750a191437c87af38c90e40a Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Tue, 20 Feb 2024 15:04:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E9=A2=84=E5=94=AE=E5=95=86?= =?UTF-8?q?=E5=93=81=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/ProductRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 42100f88..6df2b81e 100755 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -1286,9 +1286,9 @@ class ProductRepository extends BaseRepository $attr = $this->detailAttr($res['attr']); $attrValue = (in_array($res['product_type'], [3, 4])) ? $res['oldAttrValue'] : $res['attrValue']; $oldProduct = Product::where('product_id', $res['old_product_id'])->field('product_id,stock')->find(); - $activityId = CloudProduct::where('product_id', $res['product_id'])->value('activity_id'); + $storeActivityId = CloudProduct::where('product_id', $res['product_id'])->value('activity_id'); $sku = $this->detailAttrValue($attrValue, $userInfo, $productType, $activityId); - if ($activityId == 2 && isset($oldProduct['stock'])) { + if ($storeActivityId == 2 && isset($oldProduct['stock'])) { $res['stock'] = $oldProduct['stock']; foreach ($sku as &$skuItem) { $skuItem['stock'] = $oldProduct['stock'];