更新商户入驻

This commit is contained in:
yaooo 2023-09-14 11:40:03 +08:00
parent 0aec7eec6c
commit 23a4cc02f6

View File

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