@ -1785,7 +1785,7 @@ class QueryController extends BaseController
$map['_string'] = 'ui.role_id in(' . $subQuery . ')';
$map['_string'] = 'ui.role_id in(' . $subQuery . ')';
}
}
$orderBy = 'ui. play_time desc';
$orderBy = 'play_time desc';
if (!empty($sortName)) {
if (!empty($sortName)) {
if (in_array($sortName, $sortNameData)) {
if (in_array($sortName, $sortNameData)) {
$desc = ' desc';
$desc = ' desc';
@ -1814,7 +1814,7 @@ class QueryController extends BaseController
$field = $fieldUC . ',' . $fieldUI;
$field = $fieldUC . ',' . $fieldUI;
$subQuery = M('user_play_data_count', 'tab_')->alias('uc')
$subQuery = M('user_play_data_count', 'tab_')->alias('uc')
->field($field)
->field($field)
->join('tab_user_play_info as ui on ui.promote_id = uc.promote_id and ui. game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id')
->join('tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id')
->where($map)
->where($map)
->group('uc.role_id,uc.server_id,uc.game_id')
->group('uc.role_id,uc.server_id,uc.game_id')
->buildSql();
->buildSql();