每日概况

master
chenxiaojun 5 years ago
parent 0f41a508be
commit db80c32938

@ -1052,6 +1052,14 @@ class QueryController extends BaseController
$summaryData['spend_all_amount'][] = $list['spend_all_amount']; $summaryData['spend_all_amount'][] = $list['spend_all_amount'];
} }
$summaryData['date'] = array_reverse($summaryData['date']);
$summaryData['role_num'] = array_reverse($summaryData['role_num']);
$summaryData['user_num'] = array_reverse($summaryData['user_num']);
$summaryData['new_user_num'] = array_reverse($summaryData['new_user_num']);
$summaryData['new_device_num'] = array_reverse($summaryData['new_device_num']);
$summaryData['spend_user_num'] = array_reverse($summaryData['spend_user_num']);
$summaryData['spend_all_amount'] = array_reverse($summaryData['spend_all_amount']);
$serverData = $this->getServer(I('relation_game_id'), I('sdk_version')); $serverData = $this->getServer(I('relation_game_id'), I('sdk_version'));
$thisParentPromoteId = getParentPromoteId(PID);//本账号上级渠道ID $thisParentPromoteId = getParentPromoteId(PID);//本账号上级渠道ID
@ -1657,13 +1665,13 @@ class QueryController extends BaseController
$map['play_time'] = ['between', [$playTimeBegin, $playTimeEnd]]; $map['play_time'] = ['between', [$playTimeBegin, $playTimeEnd]];
} }
if ($isSelf) { if ($isSelf) {
$map['promote_id'] = $promote['id']; $map['promote_id'] = $promote['id'];
} else { } else {
if ($headmanPromoteId != 0) { if ($headmanPromoteId != 0) {
$map['promote_id'] = $headmanPromoteId; $map['promote_id'] = $headmanPromoteId;
} }
if ($promoteId != 0) { if ($promoteId != 0) {
$map['promote_id'] = $promoteId; $map['promote_id'] = $promoteId;
} }
} }
$query = M('user_play_info', 'tab_')->where($map); $query = M('user_play_info', 'tab_')->where($map);
@ -1723,22 +1731,22 @@ class QueryController extends BaseController
$map['sdk_version'] = $sdkVersion; $map['sdk_version'] = $sdkVersion;
} }
if ($isSelf) { if ($isSelf) {
$map['promote_id'] = $promote['id']; $map['promote_id'] = $promote['id'];
$spendMap['promote_id'] = $promote['id']; $spendMap['promote_id'] = $promote['id'];
} else { } else {
if ($headmanPromoteId != 0) { if ($headmanPromoteId != 0) {
$map['promote_id'] = $headmanPromoteId; $map['promote_id'] = $headmanPromoteId;
$spendMap['promote_id'] = $headmanPromoteId; $spendMap['promote_id'] = $headmanPromoteId;
} }
if ($promoteId != 0) { if ($promoteId != 0) {
$map['promote_id'] = $promoteId; $map['promote_id'] = $promoteId;
$spendMap['promote_id'] = $promoteId; $spendMap['promote_id'] = $promoteId;
} }
} }
$query = M('user_play_info', 'tab_')->where($map); $query = M('user_play_info', 'tab_')->where($map);
list($roles, $pagination, $count) = $this->paginate($query); list($roles, $pagination, $count) = $this->paginate($query);
$roleIds = array_column($roles, 'role_id'); $roleIds = array_column($roles, 'role_id');
$spendMap['pay_status'] = 1; $spendMap['pay_status'] = 1;
$spendMap['pay_game_status'] = 1; $spendMap['pay_game_status'] = 1;
if (count($roleIds) > 0) { if (count($roleIds) > 0) {
@ -1771,13 +1779,13 @@ class QueryController extends BaseController
'server_name' => $role['server_name'], 'server_name' => $role['server_name'],
'recharge_cost' => isset($allRecords[$role['role_id']]) ? round(floatval($allRecords[$role['role_id']]['cost']), 2) : 0, 'recharge_cost' => isset($allRecords[$role['role_id']]) ? round(floatval($allRecords[$role['role_id']]['cost']), 2) : 0,
'recharge_count' => isset($allRecords[$role['role_id']]) ? $allRecords[$role['role_id']]['count'] : 0, 'recharge_count' => isset($allRecords[$role['role_id']]) ? $allRecords[$role['role_id']]['count'] : 0,
'recharge_cost_today' =>isset($todayRecords[$role['role_id']]) ? round(floatval($todayRecords[$role['role_id']]['cost']), 2) : 0, 'recharge_cost_today' => isset($todayRecords[$role['role_id']]) ? round(floatval($todayRecords[$role['role_id']]['cost']), 2) : 0,
'play_time' => $role['play_time'], 'play_time' => $role['play_time'],
'play_ip' => $role['play_ip'], 'play_ip' => $role['play_ip'],
'promote_id' => $role['promote_id'], 'promote_id' => $role['promote_id'],
'promote_account' => $role['promote_account'], 'promote_account' => $role['promote_account'],
'sdk_version' => $role['sdk_version'], 'sdk_version' => $role['sdk_version'],
'unlogin_day' => intval((strtotime(date('Y-m-d 00:00:00')) - strtotime(date('Y-m-d 00:00:00', $role['play_time']))) / (24*3600) ) 'unlogin_day' => intval((strtotime(date('Y-m-d 00:00:00')) - strtotime(date('Y-m-d 00:00:00', $role['play_time']))) / (24 * 3600))
]; ];
} }

@ -374,7 +374,7 @@
color: "#999" color: "#999"
}, },
alignWithLabel: true, alignWithLabel: true,
interval: 0, interval: 1,
}, },
axisLine: { axisLine: {
lineStyle: { lineStyle: {

Loading…
Cancel
Save