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