优化:附近商家支持显示指定类型的商户
This commit is contained in:
parent
860555eabc
commit
70463539c3
|
|
@ -38,7 +38,7 @@ class MerchantDao extends BaseDao
|
|||
public function search(array $where, $is_del = 0)
|
||||
{
|
||||
$merchantType = $where['merchant_type'] ?? 0;
|
||||
$merchantType = in_array((int)$merchantType,[1,2,3]) ? $merchantType : 0;// 类型非法,使用默认类型
|
||||
$merchantType = in_array((int)$merchantType,[0,1,2]) ? $merchantType : 0;// 类型非法,使用默认类型
|
||||
|
||||
$query = Merchant::getDB()
|
||||
->where('merchant_type', $merchantType)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class Merchant extends BaseController
|
|||
public function lst()
|
||||
{
|
||||
[$page, $limit] = $this->getPage();
|
||||
$where = $this->request->params(['keyword', 'order', 'is_best', 'location', 'category_id', 'type_id','is_trader']);
|
||||
$where = $this->request->params(['keyword', 'order', 'is_best', 'location', 'category_id', 'type_id','is_trader','merchant_type']);
|
||||
return app('json')->success($this->repository->getList($where, $page, $limit, $this->userInfo));
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue