Commit 909081ab authored by hujun's avatar hujun

客户电话跟进去除客户省市区查询

parent c2ebef28
......@@ -340,13 +340,6 @@ class Broker extends Basic
$user_status = $params['user_status'];
$Users = new Users();
$result = $Users->getUserCityInfo($user_id);
if ($result) {
$params['province'] = $result[0]['province'] ? $result[0]['province'] : '上海市';
$params['city'] = $result[0]['city'] ? $result[0]['city'] : '上海市';
$params['disc'] = $result[0]['disc'] ? $result[0]['disc'] : '黄浦区';
}
$UPhoneFollowPp = new UPhoneFollowPp($this->siteId);
$result = $UPhoneFollowPp->savePhoneFollow($params);
......
......@@ -548,17 +548,16 @@ class CallPhoneService
$array = explode('-', $v);
$follow_where['agent_id'] = $array[0];
$follow_where['user_id'] = $array[1];
if(isset($array[2])){
$site_id = $array[2];
}else{
$site_id = '10001';
}
$m_follow_up = new UPhoneFollowPp($site_id);
$num = $m_follow_up->getFollowTotal($follow_where);
if (empty($num) && !empty($array[1])) {
//$agent_id, $user_id, $content, $type
$m_follow_up->insertDefaultFollow($array[0], $array[1], $content, 0);
if(empty($array[2])){
$this->redis->hDel($user_key, $v);
} else {
$m_follow_up = new UPhoneFollowPp($array[2]);
$num = $m_follow_up->getFollowTotal($follow_where);
if (empty($num) && !empty($array[1])) {
//$agent_id, $user_id, $content, $type
$m_follow_up->insertDefaultFollow($array[0], $array[1], $content, 0);
$this->redis->hDel($user_key, $v);
}
}
}
}
......
......@@ -297,21 +297,6 @@ class UPhoneFollowPp extends BaseModel
$data['agent_id'] = $agent_id;
$data['user_id'] = $user_id;
$data['content'] = $content;
if ($user_id > 0) {
try {
$m_user = new Users();
$user_data = $m_user->selectUser($user_id, 'province,city,disc');
$data['province'] = $user_data['province'];
$data['city'] = $user_data['city'];
$data['disc'] = $user_data['disc'];
} catch (\Exception $e) {
$data['province'] = "";
$data['city'] = "";
$data['disc'] = "";
}
}
$data['type'] = $type;
return $this->UPhoneFollowPp->insertGetId($data);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment