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'] ?? '';