Commit e9ecc31b authored by zhuwei's avatar zhuwei Committed by zw

普通跟进,对客户状态进行更新

parent e84cc0ac
......@@ -137,17 +137,22 @@ class Broker extends Basic
$content = $params['content'];
$labels_id = empty($params['labels_id'])? '':$params['labels_id'];
$user_id = $params['user_id'];
$agent_id = $params['agent_id'];
$type = $params['type'];
$agent_id = $params['agent_id'];
$type = $params['type'];//0电话跟进 1普通跟进
//主表查询商铺详细信息
$UPhoneFollowPp = new UPhoneFollowPp();
$UPhoneFollowPp->content =$content;
$UPhoneFollowPp->content = $content;
$UPhoneFollowPp->labels_id = $labels_id;
$UPhoneFollowPp->user_id =$user_id;
$UPhoneFollowPp->agent_id =$agent_id;
$UPhoneFollowPp->type =$type;
$UPhoneFollowPp->user_id = $user_id;
$UPhoneFollowPp->agent_id = $agent_id;
$UPhoneFollowPp->type = $type;
$UPhoneFollowPp->save();
//dump($UPhoneFollowPp->id);exit;
if($type == '1'){
//普通跟进,对客户状态进行更新 0:求租;1:已租;-1:无效
$Users = new Users();
$Users -> update_user_status(['id'=>$user_id,'user_status'=>$labels_id]);
}
if ($UPhoneFollowPp->id) {
return $this->response("200", "success!", $UPhoneFollowPp->id);
......
......@@ -295,4 +295,11 @@ class Users extends Model
->where($params)
->count();
}
/**
* 普通跟进,对客户状态进行更新
*/
public function update_user_status($conditions='')
{
return db('u_users')->update($conditions);
}
}
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