From a7d48d31c159992cadc957dcf083c48c1ffd1f8e Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Mon, 4 Dec 2023 15:30:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=95=86=E6=88=B7=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/shop/MerchantController.php | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 app/adminapi/controller/shop/MerchantController.php diff --git a/app/adminapi/controller/shop/MerchantController.php b/app/adminapi/controller/shop/MerchantController.php new file mode 100644 index 00000000..dc070897 --- /dev/null +++ b/app/adminapi/controller/shop/MerchantController.php @@ -0,0 +1,69 @@ +request->get(); + $result = curl_post($this->shopUrl . '/middle/merchant/city/get_area',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + + public function count(): Json + { + $params=$this->request->get(); + $result = curl_post($this->shopUrl . '/middle/merchant/count',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + + public function categoryOptions(): Json + { + $params=$this->request->get(); + $result = curl_post($this->shopUrl . '/middle/merchant/category/options',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + + public function typeOptions(): Json + { + $params=$this->request->get(); + $result = curl_post($this->shopUrl . '/middle/merchant/type/options',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + + + public function lst(): Json + { + $params = $this->request->get(['keyword', 'date', 'status', 'statusTag', 'is_trader', 'category_id', 'type_id', 'area_id', 'street_id']); + $result = curl_post($this->shopUrl . '/middle/merchant/lst',$params,$this->reqHeader); + if(($result['status'] ?? 500) != 200){ + return $this->fail($result['message'] ?? '非法请求'); + } + return json($result); + } + +} \ No newline at end of file