|
|
|
@ -789,20 +789,23 @@ AND UNIX_TIMESTAMP(
|
|
|
|
|
|
|
|
|
|
// 新增用户
|
|
|
|
|
|
|
|
|
|
/* M('user', 'tab_')
|
|
|
|
|
$userMap = $conditions;
|
|
|
|
|
if (isset($userMap['promote_id'])) {
|
|
|
|
|
$userMap['tab_user.promote_id'] = $userMap['promote_id'];
|
|
|
|
|
unset($userMap['promote_id']);
|
|
|
|
|
}
|
|
|
|
|
$newUsers = M('user', 'tab_')
|
|
|
|
|
->field('count(*) count, FROM_UNIXTIME(register_time, "%Y-%m-%d") date')
|
|
|
|
|
->where([
|
|
|
|
|
'game_id' => ['in', $gameIdRows],
|
|
|
|
|
'register_time' => ['between', [$startTime, $endTime]]
|
|
|
|
|
])
|
|
|
|
|
->join('tab_user_play on tab_user.id = tab_user_play.user_id and tab_user.fgame_id = tab_user_play.game_id', 'left')
|
|
|
|
|
->where(array_merge($userMap, ['register_time' => ['between', [$startTime, $endTime]]]))
|
|
|
|
|
->group('date')
|
|
|
|
|
->select(); */
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
$newUsers = M('user_play', 'tab_')
|
|
|
|
|
/* $newUsers = M('user_play', 'tab_')
|
|
|
|
|
->field('count(DISTINCT user_id) count, FROM_UNIXTIME(create_time, "%Y-%m-%d") date')
|
|
|
|
|
->where(array_merge($conditions, ['create_time' => ['between', [$startTime, $endTime]]]))
|
|
|
|
|
->group('date')
|
|
|
|
|
->select();
|
|
|
|
|
->select(); */
|
|
|
|
|
$newUsers = index_by_column('date', $newUsers);
|
|
|
|
|
|
|
|
|
|
// 活跃用户
|
|
|
|
|