修改商品列表查询

This commit is contained in:
luofei 2024-03-19 11:26:57 +08:00
parent 224f7707f1
commit 3353d52a62

View File

@ -77,7 +77,7 @@ class SpuDao extends BaseDao
$merIds = Merchant::whereIn('wholesale', $saleType)->column('mer_id');
$query->whereIn('P.mer_id', $merIds);
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){