Commit e5e1a607 authored by zhuwei's avatar zhuwei

原盘重盘重置

parent 6179dc0b
...@@ -902,6 +902,7 @@ class UserService ...@@ -902,6 +902,7 @@ class UserService
} }
$this->user->updateUsers($id,$params_); $this->user->updateUsers($id,$params_);
} }
$this->removeUserBindType($user_id);//原盘重盘重置
$redis_service = new RedisCacheService(); $redis_service = new RedisCacheService();
$redis_service->userCache($user_id); $redis_service->userCache($user_id);
$redis_service->userCache($now_user_id); $redis_service->userCache($now_user_id);
...@@ -1031,4 +1032,29 @@ class UserService ...@@ -1031,4 +1032,29 @@ class UserService
return true; return true;
} }
/**
* 还原 原盘重盘
* @param $user_id
* @return bool
*/
public function removeUserBindType($user_id)
{
$user_bind_type = $this->user->getUserByWhereValue('bind_type', ['id'=>$user_id]);
if($user_bind_type == 1){
//当前用户是原盘的还原全部设置
$s_user_call = new UserCallStintService();
$user_list = $s_user_call->getUserBindList($user_id);
if(!$user_list or (count($user_list) < 2)){
return false;
}
foreach($user_list as $k => $v) {
$this->user->updateUsers($v, ['bind_type'=>0]);
}
}else{
//
$this->user->updateUsers($user_id, ['bind_type'=>0]);
}
return true;
}
} }
\ No newline at end of file
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