作者 赵彬吉

update

@@ -88,7 +88,14 @@ class postInquiry extends Command @@ -88,7 +88,14 @@ class postInquiry extends Command
88 if($val['type'] == 1){ 88 if($val['type'] == 1){
89 $this->visit($detail, $val); 89 $this->visit($detail, $val);
90 }else{ 90 }else{
91 - $this->inquiry($detail, $val); 91 + $res = $this->inquiry($detail, $val);
  92 + if($res){
  93 + //转发表单
  94 + $form = ReInquiryForm::find($detail['form_id']);
  95 + $form->success_num = $form->success_num + 1;
  96 + $form->save();
  97 + Log::channel('inquiry_relay')->info('询盘成功:',[$detail['form_id'], $val->id, getmypid()]);
  98 + }
92 } 99 }
93 }catch (\Exception $e){ 100 }catch (\Exception $e){
94 Log::channel('inquiry_relay')->error('inquiry_relay handle error', [$e->getMessage(), $e->getFile(), $e->getLine()]); 101 Log::channel('inquiry_relay')->error('inquiry_relay handle error', [$e->getMessage(), $e->getFile(), $e->getLine()]);
@@ -104,11 +111,6 @@ class postInquiry extends Command @@ -104,11 +111,6 @@ class postInquiry extends Command
104 $detail->status = ReInquiryDetail::STATUS_SUCCESS; 111 $detail->status = ReInquiryDetail::STATUS_SUCCESS;
105 $detail->result = $val['url']; 112 $detail->result = $val['url'];
106 $detail->save(); 113 $detail->save();
107 - //转发表单  
108 - $form = ReInquiryForm::find($detail['form_id']);  
109 - $form->success_num = $form->success_num + 1;  
110 - $form->save();  
111 - Log::channel('inquiry_relay')->info('询盘成功:',[$detail['form_id'], $val->id, getmypid()]);  
112 } 114 }
113 } 115 }
114 } 116 }