修改商品列表查询
This commit is contained in:
parent
224f7707f1
commit
3353d52a62
@ -77,7 +77,7 @@ class SpuDao extends BaseDao
|
|||||||
$merIds = Merchant::whereIn('wholesale', $saleType)->column('mer_id');
|
$merIds = Merchant::whereIn('wholesale', $saleType)->column('mer_id');
|
||||||
$query->whereIn('P.mer_id', $merIds);
|
$query->whereIn('P.mer_id', $merIds);
|
||||||
if ($where['sale_type'] == Enum::SALE_TYPE_WHOLESALE) {
|
if ($where['sale_type'] == Enum::SALE_TYPE_WHOLESALE) {
|
||||||
$query->join('StoreProductAttrValue PAV','S.product_id = PAV.product_id', 'left')->where('PAV.wholesale_price', '>', 0);
|
$query->where('P.wholesale_price', '>', 0);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
->when(isset($where['product_ids']) && $where['product_ids'] !== '',function($query)use($where){
|
->when(isset($where['product_ids']) && $where['product_ids'] !== '',function($query)use($where){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user