|
|
@ -135,7 +135,7 @@ class UserRepository
|
|
|
|
$conditions = $this->getDayGroupConditions($params);
|
|
|
|
$conditions = $this->getDayGroupConditions($params);
|
|
|
|
$subQuery = M('login_daily_record', 'tab_')->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT user_id) as count')
|
|
|
|
$subQuery = M('login_daily_record', 'tab_')->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT user_id) as count')
|
|
|
|
->where($conditions)
|
|
|
|
->where($conditions)
|
|
|
|
->group('game_id')
|
|
|
|
->group('day,game_id')
|
|
|
|
->buildSql();
|
|
|
|
->buildSql();
|
|
|
|
$items = M()->field('*,sum(count) as count')
|
|
|
|
$items = M()->field('*,sum(count) as count')
|
|
|
|
->table($subQuery)
|
|
|
|
->table($subQuery)
|
|
|
@ -301,7 +301,7 @@ class UserRepository
|
|
|
|
|
|
|
|
|
|
|
|
$subQuery = M('user_play_info', 'tab_')->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT user_id) as count')
|
|
|
|
$subQuery = M('user_play_info', 'tab_')->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT user_id) as count')
|
|
|
|
->where($conditions)
|
|
|
|
->where($conditions)
|
|
|
|
->group('game_id')
|
|
|
|
->group('day,game_id')
|
|
|
|
->buildSql();
|
|
|
|
->buildSql();
|
|
|
|
$items = M()->field('*,sum(count) as count')
|
|
|
|
$items = M()->field('*,sum(count) as count')
|
|
|
|
->table($subQuery)
|
|
|
|
->table($subQuery)
|
|
|
@ -358,7 +358,7 @@ class UserRepository
|
|
|
|
->count();
|
|
|
|
->count();
|
|
|
|
$subQuery = $model->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT user_id) as count')
|
|
|
|
$subQuery = $model->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT user_id) as count')
|
|
|
|
->where($conditions)
|
|
|
|
->where($conditions)
|
|
|
|
->group('game_id')
|
|
|
|
->group('day,game_id')
|
|
|
|
->buildSql();
|
|
|
|
->buildSql();
|
|
|
|
$items = M()->field("*,sum(count) as count,(" . $sql . ") as num")
|
|
|
|
$items = M()->field("*,sum(count) as count,(" . $sql . ") as num")
|
|
|
|
->table($subQuery)
|
|
|
|
->table($subQuery)
|
|
|
@ -427,7 +427,7 @@ class UserRepository
|
|
|
|
->count();
|
|
|
|
->count();
|
|
|
|
$subQuery = $model->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT create_device_number) as count')
|
|
|
|
$subQuery = $model->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT create_device_number) as count')
|
|
|
|
->where($conditions)
|
|
|
|
->where($conditions)
|
|
|
|
->group('game_id')
|
|
|
|
->group('day,game_id')
|
|
|
|
->buildSql();
|
|
|
|
->buildSql();
|
|
|
|
$items = M()->field("*,sum(count) as count,(" . $sql . ") as num")
|
|
|
|
$items = M()->field("*,sum(count) as count,(" . $sql . ") as num")
|
|
|
|
->table($subQuery)
|
|
|
|
->table($subQuery)
|
|
|
@ -496,7 +496,7 @@ class UserRepository
|
|
|
|
->count();
|
|
|
|
->count();
|
|
|
|
$subQuery = $model->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT create_ip) as count')
|
|
|
|
$subQuery = $model->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT create_ip) as count')
|
|
|
|
->where($conditions)
|
|
|
|
->where($conditions)
|
|
|
|
->group('game_id')
|
|
|
|
->group('day,game_id')
|
|
|
|
->buildSql();
|
|
|
|
->buildSql();
|
|
|
|
$items = M()->field("*,sum(count) as count,(" . $sql . ") as num")
|
|
|
|
$items = M()->field("*,sum(count) as count,(" . $sql . ") as num")
|
|
|
|
->table($subQuery)
|
|
|
|
->table($subQuery)
|
|
|
|