作者 lyh

hx

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