公会后台登录修改 兼容 admin
This commit is contained in:
@@ -532,10 +532,14 @@ class Admin extends GuildAdmin
|
||||
$adminGroupName[$this->auth->id][$n['id']] = $n['name'];
|
||||
}
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
$guild_where = [];
|
||||
if($this->auth->id != 1){
|
||||
$guild_where['guild_id'] = $this->guildId;
|
||||
$guild_where['id'] = ['in', $this->childrenAdminIds];
|
||||
}
|
||||
$list = $this->model
|
||||
->where($where)
|
||||
->where('guild_id', $this->guildId)
|
||||
->where('id', 'in', $this->childrenAdminIds)
|
||||
->where($guild_where)
|
||||
->field(['password', 'salt', 'token'], true)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
||||
@@ -40,10 +40,13 @@ class Index extends GuildAdmin
|
||||
$etime = strtotime($etime_input);
|
||||
$return_data =[];
|
||||
//基础数据
|
||||
$guild_where = [];
|
||||
if($this->auth->id != 1) {
|
||||
$guild_where['guild_id'] = $guild_id;
|
||||
}
|
||||
$guild_user = Db::name('vs_guild_user')->where([
|
||||
'guild_id'=>$guild_id,
|
||||
'status'=>1,
|
||||
])->select();
|
||||
])->where($guild_where)->select();
|
||||
$return_data['room_num'] = 0;//房间数量
|
||||
$return_data['user_num'] = 0; //用户数量
|
||||
$rooms = [];
|
||||
|
||||
@@ -52,8 +52,9 @@ class Room extends GuildAdmin
|
||||
$search_etime_str = input('search_etime','');
|
||||
$s_money_search = input('s_money_search','');
|
||||
$e_money_search = input('e_money_search','');
|
||||
|
||||
if($this->auth->id != 1) {
|
||||
$where['a.guild_id'] = $guild_id;
|
||||
}
|
||||
$where['a.status'] = 1;
|
||||
$where['a.room_id'] = ['>',0];
|
||||
if($room_id){
|
||||
|
||||
@@ -47,7 +47,9 @@ class Statistical extends GuildAdmin
|
||||
$stime = input('stime', '');
|
||||
$etime = input('etime', '');
|
||||
$where = [];
|
||||
if($this->auth->id != 1) {
|
||||
$where['a.guild_id'] = $guild_id;
|
||||
}
|
||||
if ($search_user_id) {
|
||||
$user_id = db::name('user')->where('user_code', $search_user_id)->value('id');
|
||||
$where['a.user_id'] = $user_id;
|
||||
@@ -93,7 +95,9 @@ class Statistical extends GuildAdmin
|
||||
$stime = input('stime', '');
|
||||
$etime = input('etime', '');
|
||||
$where = [];
|
||||
if($this->auth->id != 1) {
|
||||
$where['a.guild_id'] = $guild_id;
|
||||
}
|
||||
if ($search_room_id) {
|
||||
$where['b.room_number'] = $search_room_id;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,9 @@ class SystemMessage extends GuildAdmin
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$where['delete_time'] = 0;
|
||||
if($this->auth->id != 1) {
|
||||
$where['receiving_id'] = $guild_id;
|
||||
}
|
||||
$where['type'] = 5;
|
||||
$count = db::name('system_message')->where($where)->count();
|
||||
$lists = db::name('system_message')->where($where)->page($page, $page_limit)->select();
|
||||
|
||||
@@ -65,7 +65,9 @@ class User extends GuildAdmin
|
||||
if($search_etime){
|
||||
$where['a.createtime'] = ['<=',strtotime($search_etime)];
|
||||
}
|
||||
if($this->auth->id != 1) {
|
||||
$where['a.guild_id'] = $guild_id;
|
||||
}
|
||||
$where['a.status'] = 1;
|
||||
$count = db::name('vs_guild_user')->alias('a')->join('user b', 'a.user_id = b.id')->where($where)->count();
|
||||
$list = db::name('vs_guild_user')->alias('a')->join('user b', 'a.user_id = b.id')
|
||||
@@ -145,7 +147,9 @@ class User extends GuildAdmin
|
||||
if($search_etime){
|
||||
$where['a.createtime'] = ['<=',strtotime($search_etime)];
|
||||
}
|
||||
if($this->auth->id != 1) {
|
||||
$where['a.guild_id'] = $guild_id;
|
||||
}
|
||||
$where['a.status'] = ['in','2,3'];
|
||||
$count = db::name('vs_guild_user')->alias('a')->join('user b', 'a.user_id = b.id')->where($where)->count();
|
||||
$list = db::name('vs_guild_user')->alias('a')->join('user b', 'a.user_id = b.id')
|
||||
@@ -275,7 +279,9 @@ class User extends GuildAdmin
|
||||
if($search_etime){
|
||||
$where['a.createtime'] = ['<=',strtotime($search_etime)];
|
||||
}
|
||||
if($this->auth->id != 1) {
|
||||
$where['a.guild_id'] = $guild_id;
|
||||
}
|
||||
$list = db::name('vs_guild_user_quit_log')->alias('a')->join('user b', 'a.user_id = b.id')
|
||||
->field('a.id, a.user_id, a.guild_id,a.createtime,a.status,b.nickname, b.avatar,b.user_code,b.mobile,a.type')
|
||||
->where($where)
|
||||
|
||||
Reference in New Issue
Block a user