From 6c529e7bbd3e9e281fa3d5bcf4bd2b4c897c42b8 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Tue, 3 Dec 2019 15:21:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/StatController.class.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/StatController.class.php b/Application/Admin/Controller/StatController.class.php index 5e651cceb..b3cf7e3bb 100644 --- a/Application/Admin/Controller/StatController.class.php +++ b/Application/Admin/Controller/StatController.class.php @@ -268,6 +268,13 @@ class StatController extends ThinkController FROM_UNIXTIME(register_time+{$continueDay}*86400, '%Y-%m-%d') as register_date", "register_date"); $players = array_column($players, 'user_ids', 'register_date'); + + $map1 = array(); + $map1['lpuid'] = 0; + $map1['u.register_time'] = array('between',array($start, $end)); + if (isset($para['promote_id'])&&$para['promote_id']!="") { + $map1['u.promote_id']=$para['promote_id']; + } //获取这段时间内有登录(未流失)的玩家 $map1['r.login_time'] = array('exp', 'BETWEEN UNIX_TIMESTAMP( FROM_UNIXTIME( @@ -282,11 +289,7 @@ AND UNIX_TIMESTAMP( ) ) + 86400 * ' . $continueDay); - if (isset($para['promote_id'])&&$para['promote_id']!="") { - $map1['u.promote_id']=$para['promote_id']; - } - $map1['u.register_time'] = array('between',array($start, $end)); - $keepPlayers = $usermodel->getKeepPlayers($map1, $continueDay, count($days) > 5);// 3或7天内有登录的玩家 + $keepPlayers = $usermodel->getKeepPlayers($map1, $continueDay, count($days) > 7);// 3或7天内有登录的玩家 $keepPlayers = array_column($keepPlayers, 'user_ids', 'register_date'); $loss_count = array();//流失玩家数量