作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

@@ -74,6 +74,10 @@ class InquiryDelay extends Command @@ -74,6 +74,10 @@ class InquiryDelay extends Command
74 $post_data_new['submit_time'] = date('Y-m-d H:i:s',time()+20); 74 $post_data_new['submit_time'] = date('Y-m-d H:i:s',time()+20);
75 $token = md5($post_data_new['refer'].$post_data_new['name'].$post_data_new['ip'].date("Y-m-d",time())); 75 $token = md5($post_data_new['refer'].$post_data_new['name'].$post_data_new['ip'].date("Y-m-d",time()));
76 $post_data_new['token'] = $token; 76 $post_data_new['token'] = $token;
77 - return http_post($url,$post_data_new); 77 + $header = array(
  78 + 'CLIENT-IP: '.$post_data['ip'],
  79 + 'X-FORWARDED-FOR: '.$post_data['ip']
  80 + );
  81 + return http_post($url,$post_data_new,$header);
78 } 82 }
79 } 83 }
@@ -70,7 +70,6 @@ if (!function_exists('http_post')) { @@ -70,7 +70,6 @@ if (!function_exists('http_post')) {
70 @file_put_contents(storage_path('logs/lyh_error.log'), var_export($res, true) . PHP_EOL, FILE_APPEND); 70 @file_put_contents(storage_path('logs/lyh_error.log'), var_export($res, true) . PHP_EOL, FILE_APPEND);
71 } 71 }
72 curl_close($ch); 72 curl_close($ch);
73 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($res, true) . PHP_EOL, FILE_APPEND);  
74 return json_decode($res, true); 73 return json_decode($res, true);
75 } 74 }
76 } 75 }
@@ -100,7 +100,7 @@ class BaseController extends Controller @@ -100,7 +100,7 @@ class BaseController extends Controller
100 $this->map['updated_at'] = ['between', $this->_btw]; 100 $this->map['updated_at'] = ['between', $this->_btw];
101 break; 101 break;
102 default: 102 default:
103 - if (!empty($v)) { 103 + if (!empty($v) || $v == 0) {
104 $this->map[$k] = $v; 104 $this->map[$k] = $v;
105 } 105 }
106 break; 106 break;
@@ -171,4 +171,23 @@ class InquiryInfoController extends BaseController @@ -171,4 +171,23 @@ class InquiryInfoController extends BaseController
171 $inquiryInfoLogic->forwardTime($this->param['id']); 171 $inquiryInfoLogic->forwardTime($this->param['id']);
172 $this->response('success'); 172 $this->response('success');
173 } 173 }
  174 +
  175 + /**
  176 + * @remark :修改状态
  177 + * @name :status
  178 + * @author :lyh
  179 + * @method :post
  180 + * @time :2023/7/14 15:20
  181 + */
  182 + public function status(InquiryInfoLogic $inquiryInfoLogic){
  183 + $this->request->validate([
  184 + 'id'=>'required',
  185 + 'status'=>'required',
  186 + ],[
  187 + 'id.required' => 'id不能为空',
  188 + 'status.required' => '状态不能为空',
  189 + ]);
  190 + $inquiryInfoLogic->inquiryEdit();
  191 + $this->response('success');
  192 + }
174 } 193 }
@@ -54,13 +54,12 @@ class InquiryInfoLogic extends BaseLogic @@ -54,13 +54,12 @@ class InquiryInfoLogic extends BaseLogic
54 $this->param['created_at'] = date('Y-m-d H:i:s'); 54 $this->param['created_at'] = date('Y-m-d H:i:s');
55 $this->param['updated_at'] = date('Y-m-d H:i:s'); 55 $this->param['updated_at'] = date('Y-m-d H:i:s');
56 $xp_id = $this->model->insertGetId($this->param); 56 $xp_id = $this->model->insertGetId($this->param);
57 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export($xp_id, true) . PHP_EOL, FILE_APPEND); 57 +// @file_put_contents(storage_path('logs/lyh_error.log'), var_export($xp_id, true) . PHP_EOL, FILE_APPEND);
58 if(!$xp_id){ 58 if(!$xp_id){
59 $this->fail('error'); 59 $this->fail('error');
60 } 60 }
61 //延时时间为0时,询盘转发 61 //延时时间为0时,询盘转发
62 if($this->param['delay'] == 0){ 62 if($this->param['delay'] == 0){
63 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export('debug---------------1', true) . PHP_EOL, FILE_APPEND);  
64 $this->forwardTime($xp_id); 63 $this->forwardTime($xp_id);
65 } 64 }
66 return $this->success(); 65 return $this->success();
@@ -193,7 +192,24 @@ class InquiryInfoLogic extends BaseLogic @@ -193,7 +192,24 @@ class InquiryInfoLogic extends BaseLogic
193 'CLIENT-IP: '.$post_data['ip'], 192 'CLIENT-IP: '.$post_data['ip'],
194 'X-FORWARDED-FOR: '.$post_data['ip'] 193 'X-FORWARDED-FOR: '.$post_data['ip']
195 ); 194 );
196 - @file_put_contents(storage_path('logs/lyh_error.log'), var_export(json_encode($post_data_new).'debug---------------55555', true) . PHP_EOL, FILE_APPEND); 195 + @file_put_contents(storage_path('logs/lyh_error.log'), var_export(json_encode($post_data_new).'debug', true) . PHP_EOL, FILE_APPEND);
197 return http_post($url,$post_data_new,$header); 196 return http_post($url,$post_data_new,$header);
198 } 197 }
  198 +
  199 + /**
  200 + * @remark :更新询盘状态
  201 + * @name :inquiryEdit
  202 + * @author :lyh
  203 + * @method :post
  204 + * @time :2023/7/14 15:19
  205 + */
  206 + public function inquiryEdit(){
  207 + $this->param['user_id'] = $this->manager['id'];
  208 + $this->param['user_name'] = $this->manager['name'];
  209 + $rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
  210 + if($rs === false){
  211 + $this->fail('error');
  212 + }
  213 + return $this->success();
  214 + }
199 } 215 }