diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 94b27045..da68c382 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -908,11 +908,12 @@ class Auth extends BaseController public function merchantCate() { $cateList = Db::name('MerchantCategory')->field(['merchant_category_id', 'category_name'])->select(); - $typeList = [ - ['merchant_category_id' => Merchant::TypeStore ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeStore] ?? ''], - ['merchant_category_id' => Merchant::TypeTownSupplyChain ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeTownSupplyChain] ?? ''], - ['merchant_category_id' => Merchant::TypeSupplyChain ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeSupplyChain] ?? ''] - ]; + // $typeList = [ + // ['merchant_category_id' => Merchant::TypeStore ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeStore] ?? ''], + // ['merchant_category_id' => Merchant::TypeTownSupplyChain ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeTownSupplyChain] ?? ''], + // ['merchant_category_id' => Merchant::TypeSupplyChain ?? 0, 'category_name' => Merchant::TypeMap[Merchant::TypeSupplyChain] ?? ''] + // ]; + $typeList = Db::name('MerchantType')->where('is_allow_apply', 1)->field(['mer_type_id as merchant_category_id', 'type_name as category_name'])->select(); $data = [ 'category' => $cateList, 'type' => $typeList diff --git a/app/controller/api/store/merchant/Merchant.php b/app/controller/api/store/merchant/Merchant.php index 019eb28a..302e6e86 100644 --- a/app/controller/api/store/merchant/Merchant.php +++ b/app/controller/api/store/merchant/Merchant.php @@ -58,7 +58,7 @@ class Merchant extends BaseController $where = $this->request->params(['keyword', 'order', 'is_best', 'location', 'category_id', 'type_id','is_trader', 'street_id', 'credit_buy']); if (empty($where['type_id'])) { //$where['type_id'] = [MerchantModel::TypeCloudWarehouse, MerchantModel::TypeStore, MerchantModel::TypeSupplyChain, MerchantModel::TypePlatform]; - $where['type_id'] = [MerchantModel::TypeTownSupplyChain, MerchantModel::TypeStore]; + $where['type_id'] = Db::name('MerchantType')->where('is_allow_apply', 1)->where('type_code', '<>', MerchantModel::TypeCode['TypeSupplyChain'])->column('mer_type_id'); } return app('json')->success($this->repository->getList($where, $page, $limit, $this->userInfo)); }