修复分页
This commit is contained in:
parent
42a5bb0f67
commit
4ca51689a1
@ -48,7 +48,7 @@ class CloudWarehouse extends BaseController
|
|||||||
{
|
{
|
||||||
// 除了市级供应链都可以查询
|
// 除了市级供应链都可以查询
|
||||||
$typeIdArray = Db::name('MerchantType')->whereNotIn('type_code', Merchant::TypeCode['TypeSupplyChain'])->column('mer_type_id');
|
$typeIdArray = Db::name('MerchantType')->whereNotIn('type_code', Merchant::TypeCode['TypeSupplyChain'])->column('mer_type_id');
|
||||||
$params = $this->request->params(['category_id', 'street_code', 'order', ['product_type', 0], 'keyword']);
|
$params = $this->request->params(['category_id', 'street_code', 'order', ['product_type', 0], 'keyword','page_num']);
|
||||||
$search = [
|
$search = [
|
||||||
'street_id' => $params['street_code'],
|
'street_id' => $params['street_code'],
|
||||||
'type_id' => $typeIdArray ?? [],
|
'type_id' => $typeIdArray ?? [],
|
||||||
@ -61,6 +61,9 @@ class CloudWarehouse extends BaseController
|
|||||||
}
|
}
|
||||||
$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_num'])&&$params['page_num']!=''){
|
||||||
|
$page=$params['page_num'];
|
||||||
|
}
|
||||||
if (empty($merchantIds)) {
|
if (empty($merchantIds)) {
|
||||||
return app('json')->success(['count' => 0, 'list' => []]);
|
return app('json')->success(['count' => 0, 'list' => []]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user