Commit dbcbd575 authored by zhuwei's avatar zhuwei

电话跟进

parent d7f8b972
...@@ -329,7 +329,7 @@ class Broker extends Basic ...@@ -329,7 +329,7 @@ class Broker extends Basic
/** /**
* 新增-客户电话跟进 * 新增-客户电话跟进
* * H5用 2019-01-03 改原生 废弃
* @return \think\Response * @return \think\Response
*/ */
public function add_phone_follow_up() public function add_phone_follow_up()
...@@ -371,6 +371,49 @@ class Broker extends Basic ...@@ -371,6 +371,49 @@ class Broker extends Basic
} }
} }
/**
* 客户电话跟进
* @return \think\Response
*/
public function addUserPhoneFollowUp()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/*$params['content']='跟进内容';//跟进内容
$params['labels_id']=1;//g_labels表主键
$params['user_id']=59072;//u_users ID用户表id
$params['agent_id']=1;//agent表id-当前登录用户id
$params['type']='1';//0电话跟进 1普通跟进
$params['user_status']='1';//0电话跟进 1普通跟进*/
$checkResult = $this->validate($params, "BrokerValidate.verifyStatus");
if (true !== $checkResult) {
return $this->response("300", $checkResult);
}
$user_id = $params['user_id'];
$user_status = $params['user_status'];
$Users = new Users();
$UPhoneFollowPp = new UPhoneFollowPp($this->siteId);
$result = $UPhoneFollowPp->savePhoneFollow($params);
if ($result > 0) {
//跟进,对客户状态进行更新 0:求租;1:已租;-1:无效
$Users->update_user_status([ 'id' => $user_id, 'user_status' => $user_status ]);
$redis = RedisExt::getRedis();
$user_key = 'call_phone_user_' . date('Y-m-d');
$hash_key = $this->agentId . '-' . $params['user_id'].'-'.$this->siteId;
$redis->hDel($user_key, $hash_key);
return $this->response("200", "success!", $result);
} else {
return $this->response("101", "失败!");
}
}
/** /**
* 客户搜索 * 客户搜索
* *
......
...@@ -562,7 +562,7 @@ class UserService ...@@ -562,7 +562,7 @@ class UserService
// 检查权限 客方自己 有权限的人 // 检查权限 客方自己 有权限的人
$user_agent_id = $this->user->getUserByWhereValue('agent_id', ['id'=>$user_id]); $user_agent_id = $this->user->getUserByWhereValue('agent_id', ['id'=>$user_id]);
if($user_agent_id['agent_id' != $agent_id]){ if($user_agent_id['agent_id' != $agent_id]){
return 1;//无解除关联权限权限 return 1;//操作人不是客方
} }
$s_vip = new VipService(); $s_vip = new VipService();
//0:有权限 1:无权限 //0:有权限 1:无权限
......
...@@ -582,6 +582,7 @@ Route::group('broker', [ ...@@ -582,6 +582,7 @@ Route::group('broker', [
'labelEdit' => ['api_broker/label/index', ['method' => 'get|post']], //编辑标签 'labelEdit' => ['api_broker/label/index', ['method' => 'get|post']], //编辑标签
'getLabelsList' => ['api_broker/label/getLabelsList', ['method' => 'get']], //标签列表 'getLabelsList' => ['api_broker/label/getLabelsList', ['method' => 'get']], //标签列表
'add_phone_follow_up' => ['api_broker/broker/add_phone_follow_up', ['method' => 'get|post']],//新增-客户电话跟进 'add_phone_follow_up' => ['api_broker/broker/add_phone_follow_up', ['method' => 'get|post']],//新增-客户电话跟进
'addUserPhoneFollowUp' => ['api_broker/broker/addUserPhoneFollowUp', ['method' => 'get|post']],//新增-客户电话跟进
'useraction_search' => ['api_broker/broker/useraction_search', ['method' => 'get|post']],//客户电话跟进 'useraction_search' => ['api_broker/broker/useraction_search', ['method' => 'get|post']],//客户电话跟进
'vip' => ['api_broker/broker/vip', ['method' => 'get|post']], 'vip' => ['api_broker/broker/vip', ['method' => 'get|post']],
'userStateSearch' => ['api_broker/broker/userStateSearch', ['method' => 'get|post']],//新增-客户电话跟进 'userStateSearch' => ['api_broker/broker/userStateSearch', ['method' => 'get|post']],//新增-客户电话跟进
......
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