diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index dff4146a..669c499e 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -1691,6 +1691,8 @@ class ProductRepository extends BaseRepository ], $product['mer_id']); app()->make(SpuRepository::class)->changeStatus($id,$product->product_type); event('product.sell', ['product_id' => [$id]]); + $this->switchShow($id,$status,'is_used',0); + } /** @@ -1716,6 +1718,10 @@ class ProductRepository extends BaseRepository 'id' => $product['product_id'] ] ], $product['mer_id']); + if($data['status']==1){ + $this->switchShow($id,1,'is_used',0); + } + } $this->dao->updates($id, $data); Queue(ChangeSpuStatusJob::class, ['id' => $id, 'product_type' => $product_type]);