From a49f3131137b09b1a06414bf0899d66264385f15 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Mon, 2 Dec 2019 22:00:50 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/DownloadController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index d41a710b7..e95078017 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1225,7 +1225,7 @@ class DownloadController extends BaseController { // $this->ajaxReturn(array("status" => -1, "msg" => "添加导出日志失败", 'ret' => $res)); $this->error('添加下载失败'); } - $this->success('添加下载成功',U('listsIndex')); + $this->success('添加下载成功,导出数据不包含当天',U('listsIndex')); } public function userRecharge_data_export() { From 8d4d689491750ec67f57553108820a3dccb23bbb Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Mon, 2 Dec 2019 22:46:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=85=85=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/DownloadController.class.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index e95078017..653bf0c53 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1246,7 +1246,7 @@ class DownloadController extends BaseController { $initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime'); $begTime = strtotime($initBegTime); $endTime = strtotime($initEndTime); - $endTime += 3600 * 24; + if(!empty(I('endtime'))) { $endTime = $endTime + 24 *3600; } $map1['chain'] = ['like','%'.'/'.PID.'/'.'%']; $rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select(); @@ -2955,8 +2955,7 @@ class DownloadController extends BaseController { ->buildSql(); $map['_string'] = 'ui.role_id in (' . $subQuery . ')'; } - $secondDay = 24*3600 + 1; - $map['uc.create_time'] = ['between', [$map['begintime'], $map['endtime'] - $secondDay]]; + $map['uc.create_time'] = ['between', [$map['begintime'], $map['endtime'] - 1]]; unset($map['begintime']); unset($map['endtime']); //$spendMap['_string'] = 'uc.game_id = tab_user_play_info.game_id and uc.server_id = tab_user_play_info.server_id and uc.role_id = tab_user_play_info.role_id'; @@ -2965,7 +2964,7 @@ class DownloadController extends BaseController { $field = $fieldUC . ',' . $fieldUI; $subQuery = M('user_play_data_count', 'tab_')->alias('uc') ->field($field) - ->join('left join tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') + ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') ->where($map) ->group('uc.role_id,uc.server_id,uc.game_id') ->buildSql(); @@ -2975,7 +2974,7 @@ class DownloadController extends BaseController { $total = []; $total = M('user_play_data_count', 'tab_')->alias('uc') ->field($fieldUC) - ->join('left join tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') + ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') ->where($map) ->find(); foreach ($roles as $role) {