- * 电子邮箱
+ 电子邮箱
From 1e090fc6dd07c639f700f03d0b4da4225828cccb Mon Sep 17 00:00:00 2001
From: sunke <18850253506@163.com>
Date: Thu, 21 Nov 2019 19:50:19 +0800
Subject: [PATCH 05/44] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Home/Controller/DownloadController.class.php | 6 ++++--
Application/Home/View/default/Query/register.html | 3 +--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php
index 76c7d09c2..2b1fe7df7 100644
--- a/Application/Home/Controller/DownloadController.class.php
+++ b/Application/Home/Controller/DownloadController.class.php
@@ -1738,8 +1738,8 @@ class DownloadController extends BaseController {
array('promote_account','推广账号'),
array('register_time','注册时间'),
array('register_ip','注册ip'),
- array('login_time','登陆时间'),
- array('login_ip','登陆ip')
+ array('login_time','登陆时间'),
+ array('login_ip','登陆ip')
);
$model = M('user','tab_');
@@ -1747,6 +1747,8 @@ class DownloadController extends BaseController {
//var_dump($data);
$xlsData = [];
foreach ($data as $key1 => $value1) {
+ $value1['register_time'] = date("Y-m-d H:i:s",$value1['register_time']);
+ $value1['login_time'] = date("Y-m-d H:i:s",$value1['login_time']);
$value1['account'] = $this->encryption($value1['account']);
$xlsData[] = $value1;
}
diff --git a/Application/Home/View/default/Query/register.html b/Application/Home/View/default/Query/register.html
index 8943277f3..673eb850c 100644
--- a/Application/Home/View/default/Query/register.html
+++ b/Application/Home/View/default/Query/register.html
@@ -72,8 +72,7 @@
-
+
From 1ed48003ac1ddebc903190a9ce486ed99f756e59 Mon Sep 17 00:00:00 2001
From: zhengchanglong
Date: Thu, 21 Nov 2019 20:17:53 +0800
Subject: [PATCH 06/44] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AD=BE=E5=85=85?=
=?UTF-8?q?=E5=80=BCBUG=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Mobile/Controller/SsgController.class.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Application/Mobile/Controller/SsgController.class.php b/Application/Mobile/Controller/SsgController.class.php
index 431040a6f..760e72a89 100644
--- a/Application/Mobile/Controller/SsgController.class.php
+++ b/Application/Mobile/Controller/SsgController.class.php
@@ -588,10 +588,10 @@ class SsgController extends BaseController {
//$param['notifyurl'] = "https://m.wmtxkj.com/callback.php/Notify/notify/apitype/alipay";
if(stripos($_SERVER['HTTP_HOST'], '.wmtxkj.cn') || $_SERVER['HTTP_HOST']=='127.0.0.1' || stripos($_SERVER['HTTP_HOST'], '.free.idcfengye.com')){
$param['callback'] = "http://".$_SERVER['HTTP_HOST']."/mobile.php/Ssg/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
- $param['notifyurl'] = "http://".$_SERVER['HTTP_HOST']."/callback.php/Notify/notify/apitype/alipay";
+ //$param['notifyurl'] = "http://".$_SERVER['HTTP_HOST']."/callback.php/Notify/notify/apitype/alipay";
}else{
$param['callback'] = "https://".$_SERVER['HTTP_HOST']."/mobile.php/Ssg/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
- $param['notifyurl'] = "https://".$_SERVER['HTTP_HOST']."/callback.php/Notify/notify/apitype/alipay";
+ //$param['notifyurl'] = "https://".$_SERVER['HTTP_HOST']."/callback.php/Notify/notify/apitype/alipay";
}
$ali_pay = $this->alipay($param);
@@ -623,7 +623,7 @@ class SsgController extends BaseController {
->setTable("supersign")
->setPayWay($param['payway'])
->setCallback($param['callback'])
- ->setNotifyUrl($param['notifyurl'])
+ //->setNotifyUrl($param['notifyurl'])
->setGameName(get_game_name($param['game_id']))
->setServerId(0)
->setUserId($param['user_id'])
From 49270427eefe1459bcb9d49a0c852a5de3144422 Mon Sep 17 00:00:00 2001
From: chenxiaojun <956334972@qq.com>
Date: Thu, 21 Nov 2019 20:32:22 +0800
Subject: [PATCH 07/44] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=B1=87=E6=80=BB->=E5=85=85=E5=80=BC?=
=?UTF-8?q?=E7=8E=A9=E5=AE=B6--=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controller/Notify3Controller.class.php | 1 +
.../Home/Controller/QueryController.class.php | 210 ++++++++++--------
.../View/default/Query/userRecharges.html | 114 +++++++++-
Data/update.sql | 22 ++
Public/static/icons_alibaba/iconfont.css | 24 +-
Public/static/icons_alibaba/iconfont.eot | Bin 3256 -> 3452 bytes
Public/static/icons_alibaba/iconfont.js | 2 +-
Public/static/icons_alibaba/iconfont.svg | 9 +
Public/static/icons_alibaba/iconfont.ttf | Bin 3088 -> 3284 bytes
Public/static/icons_alibaba/iconfont.woff | Bin 1864 -> 1972 bytes
Public/static/icons_alibaba/iconfont.woff2 | Bin 1364 -> 1476 bytes
11 files changed, 272 insertions(+), 110 deletions(-)
diff --git a/Application/Callback/Controller/Notify3Controller.class.php b/Application/Callback/Controller/Notify3Controller.class.php
index 6c3c0e9e6..33d7e65eb 100644
--- a/Application/Callback/Controller/Notify3Controller.class.php
+++ b/Application/Callback/Controller/Notify3Controller.class.php
@@ -194,6 +194,7 @@ class Notify3Controller extends BaseController
$data['type'] = 1;
$data['sub_type'] = 1;
$data['target_id'] = $promote['id'];
+ $data['promote_id'] = $promote['id'];
$data['target_level'] = $promote['level'];
$data['target_type'] = 1;
$data['ref_id'] = $order['id'];
diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php
index 255b4d206..2529f6bd4 100644
--- a/Application/Home/Controller/QueryController.class.php
+++ b/Application/Home/Controller/QueryController.class.php
@@ -1709,118 +1709,132 @@ class QueryController extends BaseController
$isSelf = I('is_self', 0);
$roleName = I('role_name', '');
$userAccount = I('user_account', '');
- $promoteId = I('promote_id', 0);
$sdkVersion = I('sdk_version', 0);
$costBegin = I('cost_begin', '');
$costEnd = I('cost_end', '');
+ $sortName = trim(I('sort_name', ''));
+ $sort = intval(I('sort', 1));
+ $nowTime = date('Y-m-d');
+ $initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
+ $initBegTime = empty(I('begtime')) ? $initBegTime : I('begtime');
+ $initEndTime = $nowTime;
+ $initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
+ $begTime = strtotime($initBegTime);
+ $endTime = strtotime($initEndTime);
+ $endTime += 3600 * 24;
$promote = $this->getLoginPromote();
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote);
- $map[] = [
- '_logic' => 'or',
- 'id' => $queryPromote['id'],
- 'chain' => ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%']
- ];
- $ids = M('promote', 'tab_')->where($map)->getField('id', true);
+ $records = [];
+ $pagination = '';
+ $count = 0;
+ if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
+ $map[] = [
+ '_logic' => 'or',
+ 'id' => $queryPromote['id'],
+ 'chain' => ['like', $queryPromote['chain'] . $queryPromote['id'] . '/%']
+ ];
+ $ids = M('promote', 'tab_')->where($map)->getField('id', true);
- $map = [];
- if (count($ids) > 0) {
- $map = ['promote_id' => ['in', $ids]];
- } else {
- $map['_string'] = '1<>1';
- }
+ $map = [];
+ if (count($ids) > 0) {
+ $map = ['promote_id' => ['in', $ids]];
+ } else {
+ $map['_string'] = '1<>1';
+ }
- $spendMap = $map;
- if ($gameId != 0) {
- $map['game_id'] = $gameId;
- }
- if ($serverId != 0) {
- $map['server_id'] = $serverId;
- }
- if ($roleName != '') {
- $map['role_name'] = ['like', '%' . $roleName . '%'];
- }
- if ($userAccount != '') {
- $map['user_account'] = ['like', '%' . $userAccount . '%'];
- }
- if ($sdkVersion != 0) {
- $map['sdk_version'] = $sdkVersion;
- }
- if ($isSelf) {
- $map['promote_id'] = $queryPromote['id'];
- $spendMap['promote_id'] = $queryPromote['id'];
- }
- if ($costBegin != '' || $costEnd != '') {
- $having = '';
- if ($costBegin != '' && $costEnd != '') {
- $having = 'sum(cost) between ' . $costBegin . ' and ' . $costEnd;
- } elseif ($costBegin != '' && $costEnd == '') {
- $having = 'sum(cost) >= ' . $costBegin;
- } elseif ($costBegin == '' && $costEnd != '') {
- $having = 'sum(cost) <= ' . $costEnd;
+ $subMap = [];
+ if ($gameId != 0) {
+ $map['game_id'] = $gameId;
+ $subMap['game_id'] = $gameId;
+ }
+ if ($serverId != 0) {
+ $map['server_id'] = $serverId;
+ $subMap['server_id'] = $serverId;
+ }
+ if ($roleName != '') {
+ $map['role_name'] = ['like', '%' . $roleName . '%'];
+ }
+ if ($userAccount != '') {
+ $map['user_account'] = ['like', '%' . $userAccount . '%'];
+ }
+ if ($sdkVersion != 0) {
+ $map['sdk_version'] = $sdkVersion;
+ }
+ if ($isSelf) {
+ $map['promote_id'] = $queryPromote['id'];
}
- $subMap = $map;
- $subMap['pay_status'] = 1;
- $subMap['pay_game_status'] = 1;
- $subQuery = M('spend', 'tab_')->field('game_player_id')->where($subMap)->group('game_player_id')->having($having)->buildSql();
- $map['_string'] = 'role_id in (' . $subQuery . ')';
- }
- $query = M('user_play_info', 'tab_')->where($map)->order('play_time desc');
- list($roles, $pagination, $count) = $this->paginate($query);
- $roleIds = array_column($roles, 'role_id');
-
- $spendMap['pay_status'] = 1;
- $spendMap['pay_game_status'] = 1;
- if (count($roleIds) > 0) {
- $spendMap['game_player_id'] = ['in', $roleIds];
- } else {
- $spendMap['_string'] = '1<>1';
- }
- $allRecharges = M('spend', 'tab_')->field('count(*) count, sum(cost) cost, game_player_id')->where($spendMap)->group('game_player_id')->select();
- $allRecords = [];
- foreach ($allRecharges as $recharge) {
- $allRecords[$recharge['game_player_id']] = $recharge;
- }
- $spendMap['pay_time'] = ['between', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]];
- $todayRecharges = M('spend', 'tab_')->field('sum(cost) cost, game_player_id')->where($spendMap)->group('game_player_id')->select();
- $todayRecords = [];
- foreach ($todayRecharges as $recharge) {
- $todayRecords[$recharge['game_player_id']] = $recharge;
- }
+ $subMap['create_time'] = ['between', [$begTime, $endTime - 1]];
+ if ($costBegin != '' || $costEnd != '') {
+ $having = '';
+ if ($costBegin != '' && $costEnd != '') {
+ $having = 'sum(recharge_cost) between ' . $costBegin . ' and ' . $costEnd;
+ } elseif ($costBegin != '' && $costEnd == '') {
+ $having = 'sum(recharge_cost) >= ' . $costBegin;
+ } elseif ($costBegin == '' && $costEnd != '') {
+ $having = 'sum(recharge_cost) <= ' . $costEnd;
+ }
+ $subQuery = M('user_play_data_count', 'tab_')->field('role_id')
+ ->where($subMap)
+ ->group('game_id,server_id,role_id')
+ ->having($having)
+ ->buildSql();
+ $map['_string'] = 'role_id in (' . $subQuery . ')';
+ }
+ $spendMap['uc.create_time'] = ['between', [$begTime, $endTime - 1]];
+ $spendMap['_string'] = 'uc.game_id = game_id and uc.server_id = server_id and uc.role_id = role_id';
+ $sqlCost = M('user_play_data_count', 'tab_')->alias('uc')
+ ->field('sum(uc.recharge_cost) cost')
+ ->where($spendMap)
+ ->buildSql();
+ $sqlCount = M('user_play_data_count', 'tab_')->alias('uc')
+ ->field('sum(uc.recharge_count) count')
+ ->where($spendMap)
+ ->buildSql();
+ $spendMap['uc.create_time'] = ['between', [strtotime(date('Y-m-d 00:00:00')), strtotime(date('Y-m-d 23:59:59'))]];
+ $sqlTodayCost = M('user_play_data_count', 'tab_')->alias('uc')
+ ->field('sum(uc.recharge_count) count')
+ ->where($spendMap)
+ ->buildSql();
+ $query = M('user_play_info', 'tab_')
+ ->field("*,$sqlCost as cost,$sqlCount as count,$sqlTodayCost as today_cost")
+ ->where($map)
+ ->order('play_time desc');
+ list($roles, $pagination, $count) = $this->paginate($query);
- $records = [];
- foreach ($roles as $role) {
- $records[] = [
- 'user_account' => encryption($role['user_account']),
- 'game_name' => $role['game_name'],
- 'role_name' => $role['role_name'],
- 'role_id' => $role['role_id'],
- 'role_level' => $role['role_level'],
- 'server_id' => $role['server_id'],
- 'server_name' => $role['server_name'],
- 'recharge_cost' => isset($allRecords[$role['role_id']]) ? round(floatval($allRecords[$role['role_id']]['cost']), 2) : 0,
- 'recharge_count' => isset($allRecords[$role['role_id']]) ? $allRecords[$role['role_id']]['count'] : 0,
- 'recharge_cost_today' => isset($todayRecords[$role['role_id']]) ? round(floatval($todayRecords[$role['role_id']]['cost']), 2) : 0,
- 'play_time' => $role['play_time'],
- 'play_ip' => $role['play_ip'],
- 'promote_id' => $role['promote_id'],
- 'promote_account' => $role['promote_account'],
- 'sdk_version' => $role['sdk_version'],
- 'unlogin_day' => intval((strtotime(date('Y-m-d 00:00:00')) - strtotime(date('Y-m-d 00:00:00', $role['play_time']))) / (24 * 3600))
- ];
+ foreach ($roles as $role) {
+ $records[] = [
+ 'user_account' => encryption($role['user_account']),
+ 'game_name' => $role['game_name'],
+ 'role_name' => $role['role_name'],
+ 'role_id' => $role['role_id'],
+ 'role_level' => $role['role_level'],
+ 'server_id' => $role['server_id'],
+ 'server_name' => $role['server_name'],
+ 'recharge_cost' => $role['cost'],
+ 'recharge_count' => $role['count'],
+ 'recharge_cost_today' => $role['cost_today'],
+ 'play_time' => $role['play_time'],
+ 'play_ip' => $role['play_ip'],
+ 'promote_id' => $role['promote_id'],
+ 'promote_account' => $role['promote_account'],
+ 'sdk_version' => $role['sdk_version'],
+ 'unlogin_day' => intval((strtotime(date('Y-m-d 00:00:00')) - strtotime(date('Y-m-d 00:00:00', $role['play_time']))) / (24 * 3600))
+ ];
+ }
}
$games = $this->getGamesByPromote($promote);
$this->assign('games', $games);
- $this->assign('promotes', $promotes);
- $this->assign('groupPromotes', $groupPromotes);
$this->assign('records', $records);
$this->assign('pagination', $pagination);
$this->assign('count', $count);
+ $this->assign('initBegTime', $initBegTime);
+ $this->assign('initEndTime', $initEndTime);
$this->display('userRecharges');
}
@@ -1906,10 +1920,10 @@ class QueryController extends BaseController
public function achievement()
{
$time = I('time', date('Y-m-d'));
- if(!empty($time)) {
- $defaultTime = $time ;
- }else {
- $defaultTime = date('Y-m-d',time());
+ if (!empty($time)) {
+ $defaultTime = $time;
+ } else {
+ $defaultTime = date('Y-m-d', time());
}
$sdkVersion = I('sdk_version', 0);
$gameId = I('game_id', 0);
@@ -2000,7 +2014,7 @@ class QueryController extends BaseController
$rechargeCountList = $promoteRepository->getRechargeCountByIds($ids, $params);
$rechargeUserCountList = $promoteRepository->getRechargeUserCountByIds($ids, $params);
$rechargeAmountList = $promoteRepository->getRechargeAmountByIds($ids, $params);
-
+
if (I('p', 1) == 1) {
$selfParams = $params;
$selfParams['isContainSubs'] = false;
@@ -2013,7 +2027,7 @@ class QueryController extends BaseController
$selfRechargeCountList = $promoteRepository->getRechargeCountByIds([$parent['id']], $selfParams);
$selfRechargeUserCountList = $promoteRepository->getRechargeUserCountByIds([$parent['id']], $selfParams);
$selfRechargeAmountList = $promoteRepository->getRechargeAmountByIds([$parent['id']], $selfParams);
-
+
$records[] = [
'id' => $parent['id'],
'account' => $parent['account'],
@@ -2070,7 +2084,7 @@ class QueryController extends BaseController
$this->assign('parentid', $parentId);
$this->assign('count', $count);
$this->assign('timeout', $timeout);
- $this->assign('time',$defaultTime);
+ $this->assign('time', $defaultTime);
$this->display();
}
diff --git a/Application/Home/View/default/Query/userRecharges.html b/Application/Home/View/default/Query/userRecharges.html
index 29dd264db..06dce4616 100644
--- a/Application/Home/View/default/Query/userRecharges.html
+++ b/Application/Home/View/default/Query/userRecharges.html
@@ -1,6 +1,7 @@
+
@@ -60,7 +71,19 @@
~
+
+
+
@@ -77,10 +100,50 @@
游戏区服
角色名
等级
- 充值总额
- 充值次数
- 今日充值
- 未登录天数
+ 充值总额
+
+
+
+
+
+
+
+
+
+
+ 充值次数
+
+
+
+
+
+
+
+
+
+
+ 今日充值
+
+
+
+
+
+
+
+
+
+
+ 未登录天数
+
+
+
+
+
+
+
+
+
+
最后登录时间
组长|推广员
@@ -124,11 +187,41 @@