Commit 618f8c47 authored by clone's avatar clone

Merge branch 'test' of https://gitee.com/zwyjjc/tl_estate into test

parents 56b4a4b7 ed2b9e07
...@@ -152,7 +152,7 @@ class Basic extends Controller ...@@ -152,7 +152,7 @@ class Basic extends Controller
exit; exit;
} }
$this->verifyUserInfo(); $this->verifyUserInfo();
$this->verifyTime(); //$this->verifyTime();
} }
......
...@@ -662,9 +662,12 @@ class UserService ...@@ -662,9 +662,12 @@ class UserService
/** /**
* 解除绑定关系 * 解除绑定关系
* @param $user_id * @param $now_user_id //当前详情页客户
* @return int|string * @param $user_id //被取消对象客户id
* @param $agent_id //当前操作经纪人id
* @return int
*/ */
public function removeUserBind($now_user_id,$user_id,$agent_id){ public function removeUserBind($now_user_id,$user_id,$agent_id){
// 检查权限 客方自己 有权限的人 // 检查权限 客方自己 有权限的人
$s_vip = new VipService(); $s_vip = new VipService();
...@@ -676,14 +679,25 @@ class UserService ...@@ -676,14 +679,25 @@ class UserService
return 2;//无解除关联权限权限 return 2;//无解除关联权限权限
} }
$now_user_info = $this->user->getUserById($field = 'bind_id', $now_user_id);
$params_['bind_id'] = 0; $params_['bind_id'] = 0;
$nuser_info = $this->user->getUserById($field = 'bind_id', $now_user_id); if($now_user_info['bind_id'] == 0){
if($nuser_info['bind_id'] == 0){ //当前客户详情 客户 为主账户的情况
$this->user->updateUsers($user_id,$params_); $this->user->updateUsers($user_id,$params_);
$this->userDoLog($now_user_id,$user_id,$agent_id);
}else{ }else{
$this->user->updateUsers($now_user_id,$params_); //当前客户详情 客户 为子账户的情况
$id = $user_id;
$this->userDoLog($now_user_id,$user_id,$agent_id);
if($now_user_info['bind_id'] == $user_id){
//如果要解绑的对象是 主账号 将当前页面客户bind_id 改 0
$id = $now_user_id;
$this->userDoLog($user_id,$now_user_id,$agent_id);
}
$this->user->updateUsers($id,$params_);
} }
$this->userDoLog($user_id,$now_user_id,$agent_id);
return 0; return 0;
} }
......
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