Commit 9faeb128 authored by zhuwei's avatar zhuwei

客户来电记录 新增字段

parent aff40ca6
......@@ -31,16 +31,11 @@ class CallAgent extends Basic
public function addUserCallAgent(){
$params = $this->params;
/*$params = array(
"user_id" => 1,
"agent_id" => 4,
);*/
if (!isset($params["user_id"]) or !isset($params["agent_id"]) ) {
return $this->response("101", "请求参数错误");
}
//先判断是否已经存在数据
$insert["user_id"] = $params['user_id'];
$insert["agent_id"] = $params['agent_id'];
$insert["status"] = 0;
......@@ -62,11 +57,6 @@ class CallAgent extends Basic
public function addUserCallAgentV2(){
$params = $this->params;
/*$params = array(
"user_id" => 1,
"agent_id" => 4,
);*/
if (!isset($params["phone"]) ) {
return $this->response("101", "请求参数错误");
}
......@@ -74,10 +64,11 @@ class CallAgent extends Basic
$model = new AAgents();
$params_['phone'] = $params["phone"];
$agents_id = $model->getAgentsManagerID($params_);
//先判断是否已经存在数据
$insert["user_id"] = 0;
$insert["agent_id"] = $agents_id[0]['id'] ? $agents_id[0]['id'] : 0;
$insert["status"] = 0;
$insert["source"] = $params['source'] ? $params['source'] : 0;//0c端用户 1百度推广 2今日头条 3腾讯推广 4其他
$res = $this->aUserCallAgent->saveUserCallAgent($insert);//int(1)
......
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