|
|
|
@ -1733,7 +1733,7 @@ class QueryController extends BaseController
|
|
|
|
|
$pagination = '';
|
|
|
|
|
$count = 0;
|
|
|
|
|
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
|
|
|
|
|
$map[] = [
|
|
|
|
|
$map = [
|
|
|
|
|
'_logic' => 'or',
|
|
|
|
|
'id' => $queryPromote['id'],
|
|
|
|
|
'chain' => ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%']
|
|
|
|
@ -1812,19 +1812,19 @@ class QueryController extends BaseController
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$spendMap['uc . create_time'] = ['between', [$begTime, $endTime - 1]];
|
|
|
|
|
$spendMap['_string'] = 'uc . game_id = tab_user_play_info . game_id and uc . server_id = tab_user_play_info . server_id and uc . role_id = tab_user_play_info . role_id';
|
|
|
|
|
$spendMap['uc.create_time'] = ['between', [$begTime, $endTime - 1]];
|
|
|
|
|
$spendMap['_string'] = 'uc.game_id = tab_user_play_info.game_id and uc.server_id = tab_user_play_info.server_id and uc.role_id = tab_user_play_info.role_id';
|
|
|
|
|
$sqlCost = M('user_play_data_count', 'tab_')->alias('uc')
|
|
|
|
|
->field('sum(uc . recharge_cost) cost')
|
|
|
|
|
->field('sum(uc.recharge_cost) cost')
|
|
|
|
|
->where($spendMap)
|
|
|
|
|
->buildSql();
|
|
|
|
|
$sqlCount = M('user_play_data_count', 'tab_')->alias('uc')
|
|
|
|
|
->field('sum(uc . recharge_count) count')
|
|
|
|
|
->field('sum(uc.recharge_count) count')
|
|
|
|
|
->where($spendMap)
|
|
|
|
|
->buildSql();
|
|
|
|
|
$spendMap['uc . create_time'] = ['between', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]];
|
|
|
|
|
$spendMap['uc.create_time'] = ['between', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]];
|
|
|
|
|
$sqlTodayCost = M('user_play_data_count', 'tab_')->alias('uc')
|
|
|
|
|
->field('sum(uc . recharge_count) count')
|
|
|
|
|
->field('sum(uc.recharge_count) count')
|
|
|
|
|
->where($spendMap)
|
|
|
|
|
->buildSql();
|
|
|
|
|
$subQuery = M('user_play_info', 'tab_')
|
|
|
|
|