This commit is contained in:
小鱼开发
2024-06-18 16:51:15 +08:00
parent 0b618024b1
commit 48cc52379e
+6 -2
View File
@@ -390,8 +390,11 @@ class Clues extends HD_Controller
return $this->show_json(SYS_CODE_FAIL, '手机号码不准确');
}
if ($this->clues_model->get(['mobile' => $info['mobile']])) {
return $this->show_json(SYS_CODE_FAIL, '手机号已存在');
if ($clue = $this->clues_model->get(['mobile' => $info['mobile']])) {
$this->clues_model->update(array('en_time' => date('Y-m-d H:i:s')), array('mobile' => $info['mobile']));
$log = '重复留资';
$this->addLog(array('clue_id' => $clue['id'], 'type' => 9, 'log' => $log));
return $this->show_json(SYS_CODE_FAIL, '线索已存在,请直接跟进');
}
if (!$info['cf_id'] || !$info['cf2_id']) {
@@ -405,6 +408,7 @@ class Clues extends HD_Controller
'cf2_id' => $info['cf2_id'],
'admin_id' => $this->uid,
'c_time' => time(),
'en_time' => date('Y-m-d H:i:s'),
);
$info['province_id'] && $add['province_id'] = $info['province_id'];
$info['city_id'] && $add['city_id'] = $info['city_id'];