diff --git a/app/common/dao/system/merchant/MerchantDao.php b/app/common/dao/system/merchant/MerchantDao.php index 4b0db25..1830678 100644 --- a/app/common/dao/system/merchant/MerchantDao.php +++ b/app/common/dao/system/merchant/MerchantDao.php @@ -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) diff --git a/app/controller/api/store/merchant/Merchant.php b/app/controller/api/store/merchant/Merchant.php index 1fc5c7b..940669f 100644 --- a/app/controller/api/store/merchant/Merchant.php +++ b/app/controller/api/store/merchant/Merchant.php @@ -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)); } /**