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('修改成功'); }