恢复商品查询的字段
This commit is contained in:
parent
0cb775b161
commit
df2d6a74c1
@ -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'] == 'best') $query->where('P.is_best', 1);
|
||||||
else if ($where['hot_type'] == 'good') $query->where('P.is_benefit', 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);
|
return $query->order($order);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1512,7 +1512,6 @@ class ProductRepository extends BaseRepository
|
|||||||
Queue(ChangeSpuStatusJob::class, ['id' => $product['product_id'], 'product_type' => $product['product_type']]);
|
Queue(ChangeSpuStatusJob::class, ['id' => $product['product_id'], 'product_type' => $product['product_type']]);
|
||||||
}
|
}
|
||||||
$ids = is_array($ids) ? $ids : explode(',', $ids);
|
$ids = is_array($ids) ? $ids : explode(',', $ids);
|
||||||
Db::name('store_spu')->where('product_id','in',$ids)->update(['status'=>$status]);
|
|
||||||
if ($product['product_type']==0){
|
if ($product['product_type']==0){
|
||||||
Db::name('merchant_address_product')->where('product_id','in',$ids)->update(['status'=>$status]);
|
Db::name('merchant_address_product')->where('product_id','in',$ids)->update(['status'=>$status]);
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,6 @@ class StoreProduct extends BaseController
|
|||||||
$status = $this->request->param('status',0) == 1 ? 1 : 0;
|
$status = $this->request->param('status',0) == 1 ? 1 : 0;
|
||||||
$status = ['is_used' => $status];
|
$status = ['is_used' => $status];
|
||||||
$this->repository->update($id,$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]);
|
queue(ChangeSpuStatusJob::class,['id' => $id,'product_type' => 0]);
|
||||||
return app('json')->success('修改成功');
|
return app('json')->success('修改成功');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user