From 36b295919a72664c496e1e55255c0eaa48da40d8 Mon Sep 17 00:00:00 2001
From: yulingwei <2436953959@qq.com>
Date: Wed, 18 Dec 2019 11:43:48 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/Controller/ExportController.class.php | 9 ++++++++-
Application/Admin/View/Statistics/ltv.html | 7 ++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php
index 95f411bed..6872bb3b3 100644
--- a/Application/Admin/Controller/ExportController.class.php
+++ b/Application/Admin/Controller/ExportController.class.php
@@ -2994,9 +2994,15 @@ class ExportController extends Controller
$end_time = $end = strtotime($end) + 86400;
$map = " 1=1 ";
+ $game_map = "";
if (isset($_REQUEST['game_name'])) {
+ $game_ids = implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id'));
$map .= " AND game_id in (" . implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) . ")";
+ $game_map = " AND EXISTS (SELECT upi.user_id FROM tab_user_play_info as upi where upi.game_id in ({$game_ids}) AND upi.user_id = u.id ";
+ if (isset($_REQUEST['server_name'])) $game_map .= " AND upi.server_name = {$_REQUEST['server_name']} ";
+ $game_map .= ") ";
}
+
if (isset($_REQUEST['server_name'])) {
$map .= " AND server_name = '{$_REQUEST['server_name']}' ";
}
@@ -3011,10 +3017,11 @@ class ExportController extends Controller
tab_user u
WHERE
u.register_time BETWEEN {$start_time}
- AND {$end_time}
+ AND {$end_time} {$game_map}
GROUP BY reg_date
ORDER BY reg_date asc
");
+
$result = [];
foreach ($users as $index => $item) {
$ltv_start = strtotime($item['reg_date']);
diff --git a/Application/Admin/View/Statistics/ltv.html b/Application/Admin/View/Statistics/ltv.html
index 518d3000b..f68db0acb 100644
--- a/Application/Admin/View/Statistics/ltv.html
+++ b/Application/Admin/View/Statistics/ltv.html
@@ -2,6 +2,8 @@
+
+
@@ -98,7 +100,10 @@
导出
{$_page|default=''}