作者 赵彬吉

update

@@ -90,6 +90,13 @@ class postInquiry extends Command @@ -90,6 +90,13 @@ class postInquiry extends Command
90 }else{ 90 }else{
91 $this->inquiry($detail, $val); 91 $this->inquiry($detail, $val);
92 } 92 }
  93 + }catch (\Exception $e){
  94 + Log::channel('inquiry_relay')->error('inquiry_relay handle error', [$e->getMessage(), $e->getFile(), $e->getLine()]);
  95 +
  96 + $val->status = ReInquiryDetailLog::STATUS_FAIL;
  97 + $val->remark = mb_substr($e->getMessage(), 0, 200);
  98 + $val->save();
  99 + }
93 100
94 $init_num = ReInquiryDetailLog::where('detail_id', $val['detail_id'])->where('status', ReInquiryDetailLog::STATUS_INIT)->count(); 101 $init_num = ReInquiryDetailLog::where('detail_id', $val['detail_id'])->where('status', ReInquiryDetailLog::STATUS_INIT)->count();
95 if(!$init_num){ 102 if(!$init_num){
@@ -103,13 +110,6 @@ class postInquiry extends Command @@ -103,13 +110,6 @@ class postInquiry extends Command
103 $form->save(); 110 $form->save();
104 Log::channel('inquiry_relay')->info('询盘成功:',[$detail['form_id'], $val->id, getmypid()]); 111 Log::channel('inquiry_relay')->info('询盘成功:',[$detail['form_id'], $val->id, getmypid()]);
105 } 112 }
106 - }catch (\Exception $e){  
107 - Log::channel('inquiry_relay')->error('inquiry_relay handle error', [$e->getMessage(), $e->getFile(), $e->getLine()]);  
108 -  
109 - $val->status = ReInquiryDetailLog::STATUS_FAIL;  
110 - $val->remark = mb_substr($e->getMessage(), 0, 200);  
111 - $val->save();  
112 - }  
113 } 113 }
114 } 114 }
115 } 115 }