新增商户审核发布申请
This commit is contained in:
parent
38ca0eae9a
commit
cd5932e051
@ -70,9 +70,43 @@ class MerchantIntention extends BaseController
|
|||||||
'id' => $intention->mer_intention_id
|
'id' => $intention->mer_intention_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'],
|
||||||
|
'city' => $cityId,
|
||||||
|
'area' => $areaInfo['area_id'] ?? 0,
|
||||||
|
'street' => $streetId,
|
||||||
|
'mer_intention_id' => $intention->mer_intention_id
|
||||||
|
];
|
||||||
return app('json')->success('提交成功');
|
return app('json')->success('提交成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//发送商户入驻申请
|
||||||
|
public function sendMerIntentionApply($data)
|
||||||
|
{
|
||||||
|
$postUrl = env('TASK_WORKER_HOST_URL') . '/api/lstSet';
|
||||||
|
Log::info("商户入驻申请HOST: {$postUrl}");
|
||||||
|
Log::info("发送商户入驻申请信息: " . json_encode($data));
|
||||||
|
$ch = curl_init();
|
||||||
|
curl_setopt($ch, CURLOPT_URL, $postUrl);
|
||||||
|
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
|
||||||
|
$data = curl_exec($ch);
|
||||||
|
curl_close($ch);
|
||||||
|
$ok = false;
|
||||||
|
if (!empty($data) && is_string($data)) {
|
||||||
|
Log::info("商户入驻申请反馈信息" . json_encode($data));
|
||||||
|
}
|
||||||
|
return $ok;
|
||||||
|
}
|
||||||
|
|
||||||
public function update($id)
|
public function update($id)
|
||||||
{
|
{
|
||||||
if (!$this->repository->getWhere(['mer_intention_id' => (int)$id, 'uid' => $this->userInfo->uid, 'is_del' => 0]))
|
if (!$this->repository->getWhere(['mer_intention_id' => (int)$id, 'uid' => $this->userInfo->uid, 'is_del' => 0]))
|
||||||
@ -126,6 +160,7 @@ class MerchantIntention extends BaseController
|
|||||||
'images',
|
'images',
|
||||||
'merchant_category_id',
|
'merchant_category_id',
|
||||||
'mer_type_id',
|
'mer_type_id',
|
||||||
|
'social_credit_code',
|
||||||
'area_id',
|
'area_id',
|
||||||
'street_id',
|
'street_id',
|
||||||
'village_id',
|
'village_id',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user