From 865762e767ded4111417e59ae4bd4f55ebeb6dec Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Fri, 15 Mar 2024 15:10:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E6=88=B7=20=E6=89=B9=E5=8F=91?= =?UTF-8?q?=E5=95=86=E6=88=B7=E6=88=96=E6=89=B9=E5=8F=91=E9=9B=B6=E5=94=AE?= =?UTF-8?q?=E5=95=86=E6=88=B7=E6=8F=90=E4=BA=A4=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/store/merchant/MerchantIntention.php | 27 +++++++++++++++++++ route/api.php | 2 ++ 2 files changed, 29 insertions(+) diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index 3d80d359..244e7b71 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -308,6 +308,33 @@ class MerchantIntention extends BaseController return app('json')->success($data); } + public function changeIdentity() + { + $data = $this->request->params([ + 'phone', + 'mer_name', + 'mer_type_id', + 'merchant_category_id', + 'type', + 'name' + ]); + + if(empty($data['phone'])||empty($data['mer_name'])||empty($data['mer_type_id'])||empty($data['merchant_category_id'])||empty($data['type'])||empty($data['name'])){ + return app('json')->fail('参数缺失请检查'); + } + + if ($this->userInfo) $data['uid'] = $this->userInfo->uid; + $data['status'] = 0; + $intention = $this->repository->create($data); + if ($intention) { + return app('json')->success('申请更改商户身份成功'); + } else { + return app('json')->fail('申请更改商户身份失败'); + } + } + + + protected function checkParams() { $data = $this->request->params([ diff --git a/route/api.php b/route/api.php index 786564ec..3c34e37f 100644 --- a/route/api.php +++ b/route/api.php @@ -558,6 +558,8 @@ Route::group('api/', function () { Route::post('intention/create', 'api.store.merchant.MerchantIntention/create'); Route::get('intention/cate', 'api.store.merchant.MerchantIntention/cateLst'); Route::get('intention/type', 'api.store.merchant.MerchantIntention/typeLst'); + + Route::post('intention/change', 'api.store.merchant.MerchantIntention/changeIdentity');//更新身份 //浏览 Route::post('common/visit', 'api.Common/visit'); Route::get('store/product/assist/count', 'api.store.product.StoreProductAssist/userCount');