修复云商品查询
This commit is contained in:
parent
9e70be804a
commit
7a1a5f7f8e
@ -77,14 +77,13 @@ class CloudWarehouse extends BaseController
|
|||||||
$params = $this->request->params(['category_id', 'street_code', 'order', ['product_type', 0], 'keyword', 'page']);
|
$params = $this->request->params(['category_id', 'street_code', 'order', ['product_type', 0], 'keyword', 'page']);
|
||||||
$search = [
|
$search = [
|
||||||
'street_id' => $params['street_code'],
|
'street_id' => $params['street_code'],
|
||||||
'type_id' => Merchant::TypeTownSupplyChain,
|
'type_id' =>[Merchant::TypeStore,Merchant::TypeTownSupplyChain],
|
||||||
'status' => 1,
|
'status' => 1,
|
||||||
'is_del' => 0,
|
'is_del' => 0,
|
||||||
'mer_state' => 1,
|
'mer_state' => 1,
|
||||||
];
|
];
|
||||||
|
|
||||||
$merchantIds = $this->merchantDao->search($search)->column('mer_id');
|
$merchantIds = $this->merchantDao->search($search)->column('mer_id');
|
||||||
|
|
||||||
[$page, $limit] = $this->getPage();
|
[$page, $limit] = $this->getPage();
|
||||||
if (isset($params['page']) && $params['page'] != '') {
|
if (isset($params['page']) && $params['page'] != '') {
|
||||||
$page = $params['page'];
|
$page = $params['page'];
|
||||||
@ -99,7 +98,7 @@ class CloudWarehouse extends BaseController
|
|||||||
$where['is_gift_bag'] = 0;
|
$where['is_gift_bag'] = 0;
|
||||||
$where['order'] = $params['order'] ?: 'sort';
|
$where['order'] = $params['order'] ?: 'sort';
|
||||||
if (!empty($params['category_id'])) {
|
if (!empty($params['category_id'])) {
|
||||||
$where['category_id'] = $params['category_id'];
|
$where['cate_id'] = $params['category_id'];
|
||||||
}
|
}
|
||||||
$products = $this->spuRepository->getApiSearch($where, $page, $limit, false,true);
|
$products = $this->spuRepository->getApiSearch($where, $page, $limit, false,true);
|
||||||
return app('json')->success($products);
|
return app('json')->success($products);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user