From c04292e06d864cc87ea6695d35c36093fc6fb789 Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Mon, 25 Dec 2023 17:45:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/ProductRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 4e9a127f..3bf18a26 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -726,7 +726,7 @@ class ProductRepository extends BaseRepository if ($data['product_type'] == 3) $make = app()->make(ProductAssistSkuRepository::class); if ($data['product_type'] == 4) $make = app()->make(ProductGroupSkuRepository::class); - $spu_where = ['activity_id' => $activeId, 'product_type' => $data['product_type'], 'product_id' => $id]; + $spu_where = ['activity_id' => $activeId??0, 'product_type' => $data['product_type'], 'product_id' => $id]; $spu = $spu_make->getSearch($spu_where)->find(); $data['star'] = $spu['star'] ?? ''; $data['mer_labels'] = $spu['mer_labels'] ?? '';