|
|
|
@ -1817,7 +1817,7 @@ class QueryController extends BaseController
|
|
|
|
|
$roleLevelBegin = intval(I('role_level_begin', 0));
|
|
|
|
|
$roleLevelEnd = intval(I('role_level_end', 0));
|
|
|
|
|
$headmanPromoteId = I('headman_promote_id', 0);
|
|
|
|
|
$playTime = I('play_time', '');
|
|
|
|
|
$createTime = I('create_time', '');
|
|
|
|
|
|
|
|
|
|
$promote = $this->getLoginPromote();
|
|
|
|
|
$map = [
|
|
|
|
@ -1858,7 +1858,7 @@ class QueryController extends BaseController
|
|
|
|
|
$map['game_id'] = $gameId;
|
|
|
|
|
}
|
|
|
|
|
if ($serverId != 0) {
|
|
|
|
|
$map['serverId'] = $serverId;
|
|
|
|
|
$map['server_id'] = $serverId;
|
|
|
|
|
}
|
|
|
|
|
if ($roleName != '') {
|
|
|
|
|
$map['role_name'] = ['like', '%' . $roleName . '%'];
|
|
|
|
@ -1876,18 +1876,18 @@ class QueryController extends BaseController
|
|
|
|
|
} elseif ($roleLevelEnd != 0 && $roleLevelBegin != 0) {
|
|
|
|
|
$map['role_level'] = ['between', [$roleLevelBegin, $roleLevelEnd]];
|
|
|
|
|
}
|
|
|
|
|
if ($playTime != '') {
|
|
|
|
|
$playTimeRow = explode(' 至 ', $playTime);
|
|
|
|
|
$playTimeBegin = 0;
|
|
|
|
|
$playTimeEnd = 0;
|
|
|
|
|
if (count($playTimeRow) == 2) {
|
|
|
|
|
$playTimeBegin = strtotime($playTimeRow[0] . ' 00:00:00');
|
|
|
|
|
$playTimeEnd = strtotime($playTimeRow[1] . ' 23:59:59');
|
|
|
|
|
if ($createTime != '') {
|
|
|
|
|
$createTimeRow = explode(' 至 ', $createTime);
|
|
|
|
|
$createTimeBegin = 0;
|
|
|
|
|
$createTimeEnd = 0;
|
|
|
|
|
if (count($createTimeRow) == 2) {
|
|
|
|
|
$createTimeBegin = strtotime($createTimeRow[0] . ' 00:00:00');
|
|
|
|
|
$createTimeEnd = strtotime($createTimeRow[1] . ' 23:59:59');
|
|
|
|
|
} else {
|
|
|
|
|
$playTimeBegin = strtotime($playTimeRow[0] . ' 00:00:00');
|
|
|
|
|
$playTimeEnd = strtotime($playTimeRow[0] . ' 23:59:59');
|
|
|
|
|
$createTimeBegin = strtotime($createTimeRow[0] . ' 00:00:00');
|
|
|
|
|
$createTimeEnd = strtotime($createTimeRow[0] . ' 23:59:59');
|
|
|
|
|
}
|
|
|
|
|
$map['play_time'] = ['between', [$playTimeBegin, $playTimeEnd]];
|
|
|
|
|
$map['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
|
|
|
|
|
}
|
|
|
|
|
if ($isSelf) {
|
|
|
|
|
$map['promote_id'] = $promote['id'];
|
|
|
|
@ -1898,7 +1898,7 @@ class QueryController extends BaseController
|
|
|
|
|
$map['promote_id'] = $promoteId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$query = M('user_play_info', 'tab_')->where($map);
|
|
|
|
|
$query = M('user_play_info', 'tab_')->where($map)->order('create_time desc');
|
|
|
|
|
list($records, $pagination, $count) = $this->paginate($query);
|
|
|
|
|
|
|
|
|
|
$games = $this->getGamesByPromote($promote);
|
|
|
|
@ -1949,7 +1949,6 @@ class QueryController extends BaseController
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
|
|
|
|
|
|
|
|
|
|
$promotes = [];
|
|
|
|
|
$groupPromotes = $this->getGroupPromotes($promote);
|
|
|
|
|
if ($promote['parent_id'] > 0 && $promote['grand_id'] == 0) {
|
|
|
|
@ -2001,7 +2000,7 @@ class QueryController extends BaseController
|
|
|
|
|
$subQuery = M('spend', 'tab_')->field('game_player_id')->where($subMap)->group('game_player_id')->having($having)->buildSql();
|
|
|
|
|
$map['_string'] = 'role_id in ('. $subQuery . ')';
|
|
|
|
|
}
|
|
|
|
|
$query = M('user_play_info', 'tab_')->where($map);
|
|
|
|
|
$query = M('user_play_info', 'tab_')->where($map)->order('play_time desc');
|
|
|
|
|
list($roles, $pagination, $count) = $this->paginate($query);
|
|
|
|
|
$roleIds = array_column($roles, 'role_id');
|
|
|
|
|
|
|
|
|
|