From 784f416ad5f78ab6173a792ea53fac7cf7784cd3 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Thu, 16 Jan 2020 20:36:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E7=AE=A1=E7=90=86--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 68 ++++++++++++ .../Home/View/default/Query/promoteQuota.html | 13 ++- .../Home/View/default/Query/quotaDtl.html | 100 ++++++++++++++++++ 3 files changed, 177 insertions(+), 4 deletions(-) create mode 100644 Application/Home/View/default/Query/quotaDtl.html diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index e27715e03..5ef741147 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -2362,6 +2362,74 @@ class QueryController extends BaseController $this->display(); } + public function quotaDtl() + { + $nowTime = date('Y-m-d', time()); + $defaultTime = date('Y-m-d', strtotime('-6 day', time())) . " 至 " . $nowTime; + $time = I('time', $defaultTime); + $relationGameId = I('relation_game_id', 0); + $sdkVersion = I('sdk_version', 0); + $serverId = I('server_id', 0); + $roleLevelBegin = intval(I('level_begin', 0)); + $roleLevelEnd = intval(I('level_end', 0)); + $promoteId = I('promote_id', 0); + $isSelf = I('is_self', 0); + + if ($relationGameId != 0 || $sdkVersion != 0) { + $gameIds = gameSearch($relationGameId, $sdkVersion); + $map['game_id'] = ['in', $gameIds]; + } + if ($serverId != 0) { + $map['server_id'] = $serverId; + } + if ($roleLevelBegin != 0 && $roleLevelEnd == 0) { + $map['role_level'] = ['egt', $roleLevelBegin]; + } elseif ($roleLevelEnd != 0 && $roleLevelBegin == 0) { + $map['role_level'] = ['elt', $roleLevelEnd]; + } elseif ($roleLevelEnd != 0 && $roleLevelBegin != 0) { + $map['role_level'] = ['between', [$roleLevelBegin, $roleLevelEnd]]; + } + list($beginTime, $endTime) = $this->getBetweenTime($time); + $map['create_time'] = ['between', [$beginTime, $endTime]]; + if ($promoteId) { + if ($isSelf) { + $map['promote_id'] = $promoteId; + } else { + $promote = M('promote', 'tab_')->field(['id', 'chain'])->where(array('id' => $promoteId))->find(); + $promoteMap['chain'] = ['like', "{$promote['chain']}{$promote['id']}/%"]; + $promoteIds = M('promote', 'tab_')->where($promoteMap)->getField('id', true); + $promoteIds[] = $promoteId; + $map['promote_id'] = ['in', $promoteIds]; + } + } else { + $map = '1 = 2'; + } + + $query = M('user_play_info', 'tab_')->where($map)->order('create_time desc'); + list($records, $pagination, $count) = $this->paginate($query); + foreach ($records as $key => $value) { + //订单隐藏算法 + $orderLen = strlen($value['user_account']); + $strLen = 3; + $hideChar = ''; + + if ($orderLen <= 8) { + $strLen = 2; + } + + for ($i = 0; $i < $orderLen - $strLen * 2; $i++) { + $hideChar .= '*'; + } + + $records[$key]['user_account'] = substr($value['user_account'], 0, $strLen) . $hideChar . substr($value['user_account'], $orderLen - $strLen); + } + + $this->assign('records', $records); + $this->assign('pagination', $pagination); + $this->assign('count', $count); + $this->display(); + } + private function getGame($map = []) { $gameName = '全部游戏'; diff --git a/Application/Home/View/default/Query/promoteQuota.html b/Application/Home/View/default/Query/promoteQuota.html index a941f9c6e..253b7a0dc 100644 --- a/Application/Home/View/default/Query/promoteQuota.html +++ b/Application/Home/View/default/Query/promoteQuota.html @@ -10,6 +10,10 @@ line-height: 34px; height: 34px; } + .btn-span { + color: #06c; + cursor: pointer; + } @@ -80,9 +84,7 @@ 平台 游戏区服 角色数量 - 操作 -

暂无数据

@@ -98,13 +100,16 @@ {$record.sdk_version_text} {$record.server_name} {$record.role_num} - 查看下级 + + 查看详情 + + 查看详情 + -
diff --git a/Application/Home/View/default/Query/quotaDtl.html b/Application/Home/View/default/Query/quotaDtl.html new file mode 100644 index 000000000..e79866c3c --- /dev/null +++ b/Application/Home/View/default/Query/quotaDtl.html @@ -0,0 +1,100 @@ + + + + + + + +
+
+ 返回 +
+
+
+
当前位置:数据管理>推广员指标管理>查看详情
+
+ + 查看详情 +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
玩家帐号推广账号游戏名称平台游戏区服角色名等级创建时间

暂无数据

{$record.user_account}{$record.promote_account}{$record.game_name}{:getSDKTypeName($record['sdk_version'])}{$record.server_name}{$record.role_name}{$record.role_level} + + {$record.play_time|date='Y-m-d H:i:s',###} + + {$record.create_time|date='Y-m-d H:i:s',###} + +
+ +
+
+ + 导出 + + {$pagination} +
+
+
+
+ +
+
+
+
+ + + + + + + + \ No newline at end of file