From 23a4cc02f66199fae4b22450be3a870023e74151 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 14 Sep 2023 11:40:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=95=86=E6=88=B7=E5=85=A5?= =?UTF-8?q?=E9=A9=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/store/merchant/MerchantIntention.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index fcbaaab4..4cf0720e 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -139,6 +139,24 @@ class MerchantIntention extends BaseController 'id' => $id ] ]); + $areaInfo = Db::name('geo_area')->where('area_code', $data['area_id'] ?? '')->find(); + $cityId = Db::name('geo_city')->where('city_code', $areaInfo['city_code'] ?? '')->value('city_id', 0); + $streetId = Db::name('geo_street')->where('street_code', $data['street_id'] ?? '')->value('street_id', 0); + $sendData = [ + 'company_name' => $data['mer_name'], + 'organization_code' => $data['social_credit_code'] ?? '', + 'master_name' => $data['name'], + 'master_phone' => $data['phone'], + 'images' => !empty($data['images'])?json_encode($data['images']):'', + 'city' => $cityId, + 'area' => $areaInfo['area_id'] ?? 0, + 'street' => $streetId, + 'mer_intention_id' => $id + ]; + $res = $this->sendMerIntentionApply($sendData); + if (!$res) { + throw new ValidateException('申请商户入驻任务失败,请联系平台'); + } return app('json')->success('修改成功'); }