|
...
|
...
|
@@ -4,6 +4,7 @@ namespace App\Http\Logic\Aside\Projects; |
|
|
|
|
|
|
|
use App\Http\Logic\Aside\BaseLogic;
|
|
|
|
use App\Models\Projects\InquiryInfo;
|
|
|
|
use mysql_xdevapi\Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :询盘中心
|
|
...
|
...
|
@@ -35,6 +36,9 @@ class InquiryInfoLogic extends BaseLogic |
|
|
|
if(isset($map['domain'])){
|
|
|
|
$query = $query->where('gl_inquiry_info.domain','like','%'.$map['domain'].'%');
|
|
|
|
}
|
|
|
|
if(isset($map['type'])){
|
|
|
|
$query = $query->where('gl_inquiry_info.type',$map['type']);
|
|
|
|
}
|
|
|
|
$lists = $query->paginate($row, $this->selectParam(), 'page', $page);
|
|
|
|
return $this->success($lists);
|
|
|
|
}
|
|
...
|
...
|
@@ -69,6 +73,56 @@ class InquiryInfoLogic extends BaseLogic |
|
|
|
* @time :2023/7/12 9:22
|
|
|
|
*/
|
|
|
|
public function inquirySave(){
|
|
|
|
try {
|
|
|
|
$xp_id = $this->inquiryInfoSave();
|
|
|
|
$this->inquiryUserSave($xp_id);
|
|
|
|
}catch (Exception $e){
|
|
|
|
$this->fail('error');
|
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :保存询盘记录表
|
|
|
|
* @name :inquiryInfoSave
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/12 11:12
|
|
|
|
*/
|
|
|
|
public function inquiryInfoSave(){
|
|
|
|
//组装数据
|
|
|
|
$param = [
|
|
|
|
'name'=>$this->param['name'],
|
|
|
|
'email'=>$this->param['email'],
|
|
|
|
'phone'=>$this->param['phone'],
|
|
|
|
'ip'=>$this->param['ip'],
|
|
|
|
'ip_area'=>$this->param['ip_area'],
|
|
|
|
'message'=>$this->param['message'],
|
|
|
|
'type'=>$this->param['type'],
|
|
|
|
];
|
|
|
|
return $this->model->insertGetId($param);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :保存询盘用户转发记录
|
|
|
|
* @name :inquiryInfoSave
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/12 11:12
|
|
|
|
*/
|
|
|
|
public function inquiryUserSave($xp_id){
|
|
|
|
//组装数据
|
|
|
|
$param = [
|
|
|
|
'user_id'=>$this->manager['id'],
|
|
|
|
'user_name'=>$this->manager['name'],
|
|
|
|
'xp_id'=>$xp_id,
|
|
|
|
'forward_url'=>$this->param['forward_url'],
|
|
|
|
'delay'=>$this->param['delay'],
|
|
|
|
'ip'=>$this->param['ip'],
|
|
|
|
'phone'=>$this->param['phone'],
|
|
|
|
'message'=>$this->param['message'],
|
|
|
|
'send_time'=>date('Y-m-d H:i:s', time()+ $this->param['delay'] * 60 * 60)
|
|
|
|
];
|
|
|
|
return $this->model->add($param);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|