更新查询
This commit is contained in:
parent
9725a80645
commit
87ed07465a
@ -109,10 +109,11 @@ class Statistics extends BaseController
|
|||||||
if (isset($parmas['keyword']) && $parmas['keyword'] != '') {
|
if (isset($parmas['keyword']) && $parmas['keyword'] != '') {
|
||||||
$where[] = ['store_name', 'like', '%' . $parmas['keyword'] . '%'];
|
$where[] = ['store_name', 'like', '%' . $parmas['keyword'] . '%'];
|
||||||
}
|
}
|
||||||
|
$count=Db::name('store_product')->where($where)->count();
|
||||||
$list = Db::name('store_product')->where($where)->page($parmas['page'])
|
$list = Db::name('store_product')->where($where)->page($parmas['page'])
|
||||||
->field('product_id,store_name,image,price')
|
->field('product_id,store_name,image,price')
|
||||||
->limit(10)->select();
|
->limit(10)->select();
|
||||||
return app('json')->success(['page' => $parmas['page'], 'data' => $list]);
|
return app('json')->success(['page' => $parmas['page'], 'data' => $list,'count'=>$count]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user