diff --git a/app/Service/v3/Implementations/GoodsActivityService.php b/app/Service/v3/Implementations/GoodsActivityService.php index 84edb90..a1d7ee0 100644 --- a/app/Service/v3/Implementations/GoodsActivityService.php +++ b/app/Service/v3/Implementations/GoodsActivityService.php @@ -49,7 +49,7 @@ class GoodsActivityService implements GoodsActivityServiceInterface } // 商户歇业 - if($goods->store->is_rest == 1){ + if(is_null($goods->store) || $goods->store->is_open == 0 || $goods->store->is_rest == 1){ return ErrorCode::STORE_REST; } diff --git a/app/Service/v3/Implementations/GoodsService.php b/app/Service/v3/Implementations/GoodsService.php index 25bf28c..dcaa00d 100644 --- a/app/Service/v3/Implementations/GoodsService.php +++ b/app/Service/v3/Implementations/GoodsService.php @@ -40,7 +40,7 @@ class GoodsService implements GoodsServiceInterface } // 商户歇业 - if($goods->store->is_rest == 1){ + if(is_null($goods->store) || $goods->store->is_open == 0 || $goods->store->is_rest == 1){ return ErrorCode::STORE_REST; } // 商品下架或已删除