作者 lyh

hx

@@ -50,13 +50,15 @@ class InquiryInfoLogic extends BaseLogic @@ -50,13 +50,15 @@ class InquiryInfoLogic extends BaseLogic
50 public function inquirySave(){ 50 public function inquirySave(){
51 $this->param['created_at'] = date('Y-m-d H:i:s'); 51 $this->param['created_at'] = date('Y-m-d H:i:s');
52 $this->param['updated_at'] = date('Y-m-d H:i:s'); 52 $this->param['updated_at'] = date('Y-m-d H:i:s');
  53 + if($this->param['delay'] != $this->model::STATUS_ZERO){
  54 + $this->param['status'] = $this->model::STATUS_FOUR;//延时转发
  55 + }
53 $xp_id = $this->model->insertGetId($this->param); 56 $xp_id = $this->model->insertGetId($this->param);
54 -// @file_put_contents(storage_path('logs/lyh_error.log'), var_export($xp_id, true) . PHP_EOL, FILE_APPEND);  
55 if(!$xp_id){ 57 if(!$xp_id){
56 $this->fail('error'); 58 $this->fail('error');
57 } 59 }
58 //延时时间为0时,询盘转发 60 //延时时间为0时,询盘转发
59 - if($this->param['delay'] == 0){ 61 + if($this->param['delay'] == $this->model::STATUS_ZERO){
60 $this->forwardTime($xp_id); 62 $this->forwardTime($xp_id);
61 } 63 }
62 return $this->success(); 64 return $this->success();
@@ -12,5 +12,14 @@ use App\Models\Base; @@ -12,5 +12,14 @@ use App\Models\Base;
12 */ 12 */
13 class InquiryInfo extends Base 13 class InquiryInfo extends Base
14 { 14 {
  15 + const STATUS_ZERO = 0;//未转发
  16 + const STATUS_ONE = 1;//无效
  17 +
  18 + const STATUS_TWO = 2;//暂无客户
  19 +
  20 + const STATUS_THREE = 3;//已转发
  21 +
  22 + const STATUS_FOUR = 4;//延时转发中
  23 +
15 protected $table = 'gl_inquiry_info'; 24 protected $table = 'gl_inquiry_info';
16 } 25 }