From efb4a771b08ffd0c082e57c0057c611281330835 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Fri, 22 Nov 2019 17:30:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=AE=A1=E7=90=86->=E6=AF=8F=E6=97=A5=E6=A6=82?= =?UTF-8?q?=E5=86=B5|=E6=95=B0=E6=8D=AE=E6=B1=87=E6=80=BB--=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Repository/UserRepository.class.php | 10 +++++----- Application/Home/Controller/QueryController.class.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Application/Base/Repository/UserRepository.class.php b/Application/Base/Repository/UserRepository.class.php index e3ad78ade..2598a165f 100644 --- a/Application/Base/Repository/UserRepository.class.php +++ b/Application/Base/Repository/UserRepository.class.php @@ -135,7 +135,7 @@ class UserRepository $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') ->where($conditions) - ->group('game_id') + ->group('day,game_id') ->buildSql(); $items = M()->field('*,sum(count) as count') ->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') ->where($conditions) - ->group('game_id') + ->group('day,game_id') ->buildSql(); $items = M()->field('*,sum(count) as count') ->table($subQuery) @@ -358,7 +358,7 @@ class UserRepository ->count(); $subQuery = $model->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT user_id) as count') ->where($conditions) - ->group('game_id') + ->group('day,game_id') ->buildSql(); $items = M()->field("*,sum(count) as count,(" . $sql . ") as num") ->table($subQuery) @@ -427,7 +427,7 @@ class UserRepository ->count(); $subQuery = $model->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT create_device_number) as count') ->where($conditions) - ->group('game_id') + ->group('day,game_id') ->buildSql(); $items = M()->field("*,sum(count) as count,(" . $sql . ") as num") ->table($subQuery) @@ -496,7 +496,7 @@ class UserRepository ->count(); $subQuery = $model->field('FROM_UNIXTIME(create_time, "%Y-%m-%d") as day,count(DISTINCT create_ip) as count') ->where($conditions) - ->group('game_id') + ->group('day,game_id') ->buildSql(); $items = M()->field("*,sum(count) as count,(" . $sql . ") as num") ->table($subQuery) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index be50a7529..c4d6fa044 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1066,7 +1066,7 @@ class QueryController extends BaseController $params['server_id'] = $serverId; } $params['begin_time'] = $begTime; - $params['end_time'] = $endTime; + $params['end_time'] = $endTime - 1; $summaryData = []; $dayList = $this->getDayList($begTime, $endTime); @@ -1227,7 +1227,7 @@ class QueryController extends BaseController } $params['begin_time'] = $begTime; - $params['end_time'] = $endTime; + $params['end_time'] = $endTime - 1; $data = M('Apply', 'tab_')->alias('a') ->field('a.game_id,a.game_name,a.sdk_version')