商户列表添加区域检索
This commit is contained in:
parent
86f069e6a7
commit
76f9fcbbb1
@ -52,6 +52,9 @@ class MerchantDao extends BaseDao
|
|||||||
->when(isset($where['is_trader']) && $where['is_trader'] !== '', function ($query) use ($where) {
|
->when(isset($where['is_trader']) && $where['is_trader'] !== '', function ($query) use ($where) {
|
||||||
$query->where('is_trader', $where['is_trader']);
|
$query->where('is_trader', $where['is_trader']);
|
||||||
})
|
})
|
||||||
|
->when(isset($where['area_id']) && $where['area_id'] !== '', function ($query) use ($where) {
|
||||||
|
$query->where('area_id', $where['area_id']);
|
||||||
|
})
|
||||||
->when(isset($where['street_id']) && $where['street_id'] !== '', function ($query) use ($where) {
|
->when(isset($where['street_id']) && $where['street_id'] !== '', function ($query) use ($where) {
|
||||||
$query->where('street_id', $where['street_id']);
|
$query->where('street_id', $where['street_id']);
|
||||||
})
|
})
|
||||||
|
@ -72,7 +72,7 @@ class Merchant extends BaseController
|
|||||||
public function lst()
|
public function lst()
|
||||||
{
|
{
|
||||||
[$page, $limit] = $this->getPage();
|
[$page, $limit] = $this->getPage();
|
||||||
$where = $this->request->params(['keyword', 'date', 'status', 'statusTag', 'is_trader', 'category_id', 'type_id']);
|
$where = $this->request->params(['keyword', 'date', 'status', 'statusTag', 'is_trader', 'category_id', 'type_id', 'area_id', 'street_id']);
|
||||||
return app('json')->success($this->repository->lst($where, $page, $limit));
|
return app('json')->success($this->repository->lst($where, $page, $limit));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user