|
|
@@ -131,6 +131,8 @@ class StoreProductDao extends BaseDao
|
|
|
$query->whereIn('id', function ($query) use ($where) {
|
|
|
$query->name('store_product_cate')->where('cate_id', is_array($where['sid']) ? 'in' : '=', $where['sid'])->field('product_id')->select();
|
|
|
});
|
|
|
+ })->when(isset($where['goods_user_type']), function($query) use ($where) {
|
|
|
+ $query->where('goods_user_type', $where['goods_user_type']);
|
|
|
})->when(isset($where['cid']) && $where['cid'], function ($query) use ($where) {
|
|
|
$query->whereIn('id', function ($query) use ($where) {
|
|
|
$query->name('store_product_cate')->whereIn('cate_id', function ($query) use ($where) {
|