更新查询

This commit is contained in:
mkm 2023-11-10 11:42:15 +08:00
parent 9725a80645
commit 87ed07465a

View File

@ -109,10 +109,11 @@ class Statistics extends BaseController
if (isset($parmas['keyword']) && $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'])
->field('product_id,store_name,image,price')
->limit(10)->select();
return app('json')->success(['page' => $parmas['page'], 'data' => $list]);
return app('json')->success(['page' => $parmas['page'], 'data' => $list,'count'=>$count]);
}
/**