恢复商品查询的字段

This commit is contained in:
mkm 2023-01-15 10:52:01 +08:00
parent 0cb775b161
commit df2d6a74c1
3 changed files with 0 additions and 4 deletions

View File

@ -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);
}

View File

@ -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]);
}

View File

@ -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('修改成功');
}