diff --git a/app/common/dao/store/product/SpuDao.php b/app/common/dao/store/product/SpuDao.php index b5e37dbe..1991fd0b 100644 --- a/app/common/dao/store/product/SpuDao.php +++ b/app/common/dao/store/product/SpuDao.php @@ -159,8 +159,6 @@ class SpuDao extends BaseDao else if ($where['hot_type'] == 'best') $query->where('P.is_best', 1); else if ($where['hot_type'] == 'good') $query->where('P.is_benefit', 1); }); - $query->where('P.is_show','=',1); - $query->where('P.status','=',1); return $query->order($order); } diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 3bc15b08..478ed4c9 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -1512,7 +1512,6 @@ class ProductRepository extends BaseRepository Queue(ChangeSpuStatusJob::class, ['id' => $product['product_id'], 'product_type' => $product['product_type']]); } $ids = is_array($ids) ? $ids : explode(',', $ids); - Db::name('store_spu')->where('product_id','in',$ids)->update(['status'=>$status]); if ($product['product_type']==0){ Db::name('merchant_address_product')->where('product_id','in',$ids)->update(['status'=>$status]); } diff --git a/app/controller/admin/store/StoreProduct.php b/app/controller/admin/store/StoreProduct.php index 808c4b95..5961fa2b 100644 --- a/app/controller/admin/store/StoreProduct.php +++ b/app/controller/admin/store/StoreProduct.php @@ -162,7 +162,6 @@ class StoreProduct extends BaseController $status = $this->request->param('status',0) == 1 ? 1 : 0; $status = ['is_used' => $status]; $this->repository->update($id,$status); - Db::name('store_spu')->where('product_id',$id)->update(['status'=>$status['is_used']]); queue(ChangeSpuStatusJob::class,['id' => $id,'product_type' => 0]); return app('json')->success('修改成功'); }