修复云商品查询

This commit is contained in:
mkm 2023-11-23 16:56:55 +08:00
parent 9e70be804a
commit 7a1a5f7f8e

View File

@ -77,14 +77,13 @@ class CloudWarehouse extends BaseController
$params = $this->request->params(['category_id', 'street_code', 'order', ['product_type', 0], 'keyword', 'page']);
$search = [
'street_id' => $params['street_code'],
'type_id' => Merchant::TypeTownSupplyChain,
'type_id' =>[Merchant::TypeStore,Merchant::TypeTownSupplyChain],
'status' => 1,
'is_del' => 0,
'mer_state' => 1,
];
$merchantIds = $this->merchantDao->search($search)->column('mer_id');
[$page, $limit] = $this->getPage();
if (isset($params['page']) && $params['page'] != '') {
$page = $params['page'];
@ -99,7 +98,7 @@ class CloudWarehouse extends BaseController
$where['is_gift_bag'] = 0;
$where['order'] = $params['order'] ?: 'sort';
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);
return app('json')->success($products);