Commit dd6a2278 authored by zhuwei's avatar zhuwei

数量限制

parent 5941cb98
......@@ -637,10 +637,7 @@ class UserService
if(count($user_bind) > 0){
return 3;//存在绑定关系
}
$b_user_bind = $this->userBindInfo($bind_id);
if(count($b_user_bind) > 3){
return 4;
}
$b_user_info = $this->user->getUserById($field = 'bind_id', $bind_id);
if($b_user_info['bind_id'] == 0){
$bind_id_ = $bind_id;
......@@ -648,6 +645,10 @@ class UserService
$bind_id_ = $b_user_info['bind_id'];
}
}
$bind_count = $this->userBindInfo($bind_id_);
if(count($bind_count) > 3){
return 4;
}
$params_['bind_id'] = $bind_id_;
$res = $this->user->updateUsers($user_id,$params_);
if($res ==1){
......
......@@ -1035,7 +1035,7 @@ class Users extends Model
$result = Db::table($this->table)
->where($where_)
->count();
dump($this->getLastSql());
// dump($this->getLastSql());
return $result;
}
......
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