留存率不区分设备

master
ELF 4 years ago
parent 3c3222ad26
commit 619e1de3f3

@ -4070,20 +4070,23 @@ class ExportController extends Controller
$error = '请选择游戏!';
$status = false;
}
if ($deviceType == '') {
$error = '请选择设备类型!';
$status = false;
}
$startTime = strtotime($start . ' 00:00:00');
$endTime = strtotime($end . ' 23:59:59') + 1;
if ((($endTime - $startTime)/(24*3600)) > 31) {
$error = '时间间隔不能超过31天';
$status = false;
}
$searchGameId = 0;
if ($status) {
$baseGame = M('base_game', 'tab_')->where(['id' => $baseGameId])->find();
$gameId = $deviceType == 'android' ? $baseGame['android_game_id'] : $baseGame['ios_game_id'];
$gameIds = [];
if ($deviceType) {
$searchGameId = $deviceType == 'android' ? $baseGame['android_game_id'] : $baseGame['ios_game_id'];
$gameIds[] = $searchGameId;
} else {
$gameIds = [$baseGame['android_game_id'], $baseGame['ios_game_id']];
}
$client = new Client([
'base_uri' => C('TASK_URL'),
@ -4095,7 +4098,7 @@ class ExportController extends Controller
'start_time' => $start,
'end_time' => $end,
'promote_id' => I('promote_id', 0),
'game_id' => $gameId,
'game_ids' => $gameIds,
]
]);
@ -4104,7 +4107,7 @@ class ExportController extends Controller
if (!$result) {
$this->error('数据请求异常!');
}
$gameName = get_game_name($gameId);
$gameName = $deviceType ? get_game_name($searchGameId) : $baseGame['name'];
$promoteName = '全部';
if ($promoteId) {
$promoteName = get_promote_account($promoteId);

@ -167,20 +167,23 @@ class StatController extends ThinkController
$error = '请选择游戏!';
$status = false;
}
if ($deviceType == '') {
$error = '请选择设备类型!';
$status = false;
}
$startTime = strtotime($start . ' 00:00:00');
$endTime = strtotime($end . ' 23:59:59') + 1;
if ((($endTime - $startTime)/(24*3600)) > 31) {
$error = '时间间隔不能超过31天';
$status = false;
}
$searchGameId = 0;
if ($status) {
$baseGame = M('base_game', 'tab_')->where(['id' => $baseGameId])->find();
$gameId = $deviceType == 'android' ? $baseGame['android_game_id'] : $baseGame['ios_game_id'];
$gameIds = [];
if ($deviceType) {
$searchGameId = $deviceType == 'android' ? $baseGame['android_game_id'] : $baseGame['ios_game_id'];
$gameIds[] = $searchGameId;
} else {
$gameIds = [$baseGame['android_game_id'], $baseGame['ios_game_id']];
}
$client = new Client([
'base_uri' => C('TASK_URL'),
@ -192,7 +195,7 @@ class StatController extends ThinkController
'start_time' => $start,
'end_time' => $end,
'promote_id' => I('promote_id', 0),
'game_id' => $gameId,
'game_ids' => $gameIds,
]
]);
@ -203,7 +206,7 @@ class StatController extends ThinkController
}
$data = $result['data']['records'];
$dayList = [1, 2, 3, 4, 5, 6, 7, 15, 30];
$gameName = get_game_name($gameId);
$gameName = $deviceType ? get_game_name($searchGameId) : $baseGame['name'];
$promoteName = '全部';
if ($promoteId) {
$promoteName = get_promote_account($promoteId);

Loading…
Cancel
Save