更新查询
This commit is contained in:
parent
1d74ee6265
commit
1a7d6fcf0d
@ -58,17 +58,21 @@ class StoreSpu extends BaseController
|
||||
'is_trader',
|
||||
'product_ids',
|
||||
'mer_id',
|
||||
'type_id'
|
||||
'type_id',
|
||||
'street_id'
|
||||
]);
|
||||
if($where['type_id']){
|
||||
$where['mer_ids'] = Merchant::getInstance()->whereIn('type_id', implode(',', $where['type_id']))->where(['status' => 1, 'mer_state' => 1, 'is_del' => 0])->column('mer_id');
|
||||
}else{
|
||||
unset($where['type_id']);
|
||||
$arr=['status' => 1, 'mer_state' => 1, 'is_del' => 0];
|
||||
if($where['street_id']){
|
||||
$arr['street_id']=$where['street_id'];
|
||||
}
|
||||
$where['mer_ids'] = Merchant::getInstance()->whereIn('type_id', explode(',', $where['type_id']))->where($arr)->column('mer_id');
|
||||
}
|
||||
unset($where['type_id'],$where['street_id']);
|
||||
|
||||
$where['is_gift_bag'] = 0;
|
||||
$where['product_type'] = 0;
|
||||
$where['order'] = $where['order'] ?: 'star';
|
||||
halt($where);
|
||||
if ($where['is_trader'] != 1) unset($where['is_trader']);
|
||||
$data = $this->repository->getApiSearch($where, $page, $limit, $this->userInfo);
|
||||
return app('json')->success($data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user