|
...
|
...
|
@@ -67,6 +67,7 @@ class postInquiry extends Command |
|
|
|
$form = ReInquiryForm::find($detail['form_id']);
|
|
|
|
$form->success_num = $form->success_num + 1;
|
|
|
|
$form->save();
|
|
|
|
Log::channel('inquiry_relay')->info($detail['form_id'] . '询盘成功' . $val->id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}catch (\Exception $e){
|
|
...
|
...
|
@@ -176,6 +177,10 @@ class postInquiry extends Command |
|
|
|
];
|
|
|
|
|
|
|
|
$res = Http::withoutVerifying()->post('https://form.globalso.com/api/external-interface/add/fa043f9cbec6b38f', $data)->json();
|
|
|
|
//兼容接口返回格式
|
|
|
|
if(!empty($res['data'][0]['status'])){
|
|
|
|
$res['data'][0]['code'] = $res['data'][0]['status'] == 'success' ? 200 : 400;
|
|
|
|
}
|
|
|
|
if(empty($res['data'][0]['code']) || !in_array($res['data'][0]['code'], [200,300])){
|
|
|
|
$log->status = ReInquiryDetailLog::STATUS_FAIL;
|
|
|
|
$log->remark = $res['message'] ?? '';
|
...
|
...
|
|