From 4cd44c12aee888772c4d570171acb3718fbda5e1 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Fri, 22 Sep 2023 09:51:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=8E=B7=E5=8F=96=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/store/merchant/MerchantIntention.php | 23 +++++-------------- route/api.php | 2 +- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index 2a352f56..0b814ec1 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -103,25 +103,14 @@ class MerchantIntention extends BaseController return app('json')->success('提交成功'); } - public function agreeApply() + public function settlementApply() { - $typeId = $this->request->get('mer_type_id', 0); - $typeCode = Db::name('merchant_type')->where('mer_type_id', $typeId)->value('type_code', ''); - $repository = app()->make(CacheRepository::class); - $agree = $repository->getResult('consign_product_agree'); - $agree['content'] = $agree['consign_product_agree']; - $agreeData[] = $agree; - if ($typeCode == Merchant::TypeCode['TypeStore']){ - $agree = $repository->getResult('mer_services_agree'); - $agree['content'] = $agree['mer_services_agree']; - $agreeData[] = $agree; + $status = $this->request->post('status', 0); + if ($this->userInfo) $data['uid'] = $this->userInfo->uid; + if ($status == 1) { + Db::name('merchant')->where('uid', $this->userInfo->uid)->update(['mer_settlement_agree_status'=>1]); } - if ($typeCode == Merchant::TypeCode['TypeSupplyChain'] || $typeCode == Merchant::TypeCode['TypeTownSupplyChain']){ - $agree = $repository->getResult('mer_supply_agree'); - $agree['content'] = $agree['mer_services_agree']; - $agreeData[] = $agree; - } - return app('json')->success($agreeData); + return app('json')->success('操作成功'); } public function businessApply() diff --git a/route/api.php b/route/api.php index e98cda10..5751c987 100644 --- a/route/api.php +++ b/route/api.php @@ -256,7 +256,7 @@ Route::group('api/', function () { //交易申请商户 Route::post('intention/business', 'api.store.merchant.MerchantIntention/businessApply'); //申请商户协议 - Route::get('intention/agree', 'api.store.merchant.MerchantIntention/agreeApply'); + Route::post('intention/settlement', 'api.store.merchant.MerchantIntention/settlementApply'); Route::get('intention/detail/:id', 'api.store.merchant.MerchantIntention/detail'); Route::post('intention/update/:id', 'api.store.merchant.MerchantIntention/update'); Route::post('store/product/group/cancel', 'api.store.product.StoreProductGroup/cancel');