|
|
|
@ -2728,15 +2728,21 @@ class DownloadController extends BaseController {
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
$subMap = [];
|
|
|
|
|
$subMap['game_id'] = $map['game_id'];
|
|
|
|
|
$subMap['server_id'] = $map['server_id'];
|
|
|
|
|
if(!empty($map['game_id'])) {
|
|
|
|
|
$subMap['game_id'] = $map['game_id'];
|
|
|
|
|
}
|
|
|
|
|
if(!empty($map['server_id'])) {
|
|
|
|
|
$subMap['server_id'] = $map['server_id'];
|
|
|
|
|
}
|
|
|
|
|
$costBegin = $map['costbegin'];
|
|
|
|
|
$costEnd = $map['costend'];
|
|
|
|
|
unset($map['costbegin']);
|
|
|
|
|
unset($map['costend']);
|
|
|
|
|
$roleIds = M('user_play_data_count', 'tab_')->group('role_id')->getField('role_id', true);
|
|
|
|
|
|
|
|
|
|
$subMap['create_time'] = ['between', [$map['begintime'], $map['endtime'] - 1]];
|
|
|
|
|
$roleIdMap = $subMap;
|
|
|
|
|
$roleIds = M('user_play_data_count', 'tab_')->where($roleIdMap)->group('role_id')->getField('role_id', true);
|
|
|
|
|
$map['role_id'] = ['in', $roleIds];
|
|
|
|
|
$subMap['create_time'] = ['between', [$map['begintime'], $map['endtime'] - 1]];
|
|
|
|
|
if ($costBegin != '' || $costEnd != '') {
|
|
|
|
|
$having = '';
|
|
|
|
|
if ($costBegin != '' && $costEnd != '') {
|
|
|
|
|