From 747c97ceec90e102b535a79d4862fb8147b60c8b Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 3 Dec 2019 18:47:27 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->?= =?UTF-8?q?=E9=A6=96=E9=A1=B5--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PromoteController.class.php | 34 ++++++------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index f505a8857..fff5f82d7 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -259,28 +259,21 @@ class PromoteController extends BaseController $whereUser['promote_id'] = ['IN', $promoteId]; - if ($type == 1) { - $pay_time = total(1); - $start = mktime(0, 0, 0, date('m'), date('d'), date('Y')); - $end = mktime(0, 0, 0, date('m'), date('d') + 1, date('Y')) - 1; - $whereUser['register_time'] = ['between', array($start, $end - 1)]; - $userId = M('user', 'tab_')->field('id')->where($whereUser)->select(); - - } else if ($type == 2) { - $pay_time = total(3); - $start = mktime(0, 0, 0, date('m'), 1, date('Y')); - $end = mktime(0, 0, 0, date('m') + 1, 1, date('Y')) - 1; + if (in_array($type, [1, 2])) { + if ($type == 1) { + $pay_time = total(1); + $start = mktime(0, 0, 0, date('m'), date('d'), date('Y')); + $end = mktime(0, 0, 0, date('m'), date('d') + 1, date('Y')) - 1; + } else { + $pay_time = total(3); + $start = mktime(0, 0, 0, date('m'), 1, date('Y')); + $end = mktime(0, 0, 0, date('m') + 1, 1, date('Y')) - 1; + } $whereUser['register_time'] = ['between', array($start, $end - 1)]; - $userId = M('user', 'tab_')->field('id')->where($whereUser)->select(); + $userId = M('user', 'tab_')->where($whereUser)->getField('id', true); } -// if ($userId) { -// var_dump($userId); -// } if ($userId) { - - $userId = implode(',', array_column($userId, 'id')); -// var_dump($userId); $map1['user_id'] = $map['user_id'] = ['IN', $userId]; } else if (!$userId && $type != 0) { return array('sum_mounth' => 0, 'sum_today' => 0); @@ -333,9 +326,6 @@ class PromoteController extends BaseController } $data[] = $dbdata; } -// if ($userId) { -// echo $spend->_sql();die(); -// } foreach ($data as $key => $value) { $value['count'] ?: 0; $value['today'] ?: 0; @@ -353,8 +343,6 @@ class PromoteController extends BaseController $total = $this->data_total($data); return $total; -// - } public function data_total($data) From 34b53c4ec18bfbfa01732113919e159e29d16a43 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Wed, 4 Dec 2019 10:54:38 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=B1=87=E6=80=BB?= =?UTF-8?q?=E5=90=88=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/DownloadController.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 653bf0c53..c5e747409 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1639,10 +1639,10 @@ class DownloadController extends BaseController { $nowTime = date('Y-m-d'); $begtime1 = date('Y-m-d', strtotime('-6 day', strtotime($nowTime))); $endtime1 = $nowTime; - $map["apply_time"] = ["between",[strtotime($begtime1),strtotime($endtime1)]]; + $map["apply_time"] = ["between",[strtotime($begtime1),strtotime($endtime1) + 3600*24]]; } if(!empty($begtime) && !empty($endtime)) { - $map["apply_time"] = ["between",[strtotime($begtime),strtotime($endtime) + 3600 * 24 -1]]; + $map["apply_time"] = ["between",[strtotime($begtime),strtotime($endtime) + 3600 * 24]]; } $serverField = ''; $serverJoin = ''; @@ -1841,12 +1841,12 @@ class DownloadController extends BaseController { $begTime = strtotime($initBegTime); $endTime = strtotime($initEndTime); $params['begin_time'] = $begTime; - $params['end_time'] = $endTime +3600 * 24 -1; + $params['end_time'] = $endTime -1; if(!empty($map['apply_time'][1])) { $begTime = $map['apply_time'][1][0]; $endTime = $map['apply_time'][1][1]; $params['begin_time'] = $begTime; - $params['end_time'] = $endTime + 3600 * 24 -1; + $params['end_time'] = $endTime -1; unset($map['apply_time']); } if(!empty($map['tab_server.server_id'])) { From 1c83185aaf5aaf4d9ffba453175dfc3d6f5400e2 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Wed, 4 Dec 2019 12:03:35 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/GameSourceService.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Base/Service/GameSourceService.class.php b/Application/Base/Service/GameSourceService.class.php index dcfe7edf7..4b29cf111 100644 --- a/Application/Base/Service/GameSourceService.class.php +++ b/Application/Base/Service/GameSourceService.class.php @@ -9,7 +9,7 @@ use GuzzleHttp\Client; class GameSourceService { - const IS_FIXED_IOS13 = false; + const IS_FIXED_IOS13 = true; const DEBUG = true; public function __construct() From e8a4da70cc8231510e4c6ffcccc45d24e5e63545 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Wed, 4 Dec 2019 14:33:38 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->?= =?UTF-8?q?=E9=A6=96=E9=A1=B5--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PromoteController.class.php | 122 +++++++----------- 1 file changed, 46 insertions(+), 76 deletions(-) diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index fff5f82d7..b718673a8 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -240,26 +240,25 @@ class PromoteController extends BaseController private function caculateSpend($pay_time, $condition, $create = [], $type = 0) { - $map1['promote_id'] = $map['promote_id'] = array('egt', 0); + $map['promote_id'] = array('egt', 0); $spend = M('Spend', 'tab_'); - $map1['pay_status'] = $map['pay_status'] = 1; + $map['pay_status'] = 1; $today = total(1); $yesterday = total(5); $week = total(2); $mounth = total(3); - unset( $map['create_time']); + $this->getLoginPromote(); - $promote_id = get_pid(); - - $promoteId = M("promote", "tab_") - ->field("id") - ->where(array('chain' => ['like', '/'.$promote_id . '/%'],'id'=>$promote_id,'_logic'=>'or')) - ->select(); - $promoteId = implode(',',array_column($promoteId,'id')); + $promoteId = $this->loginPromote['id']; - $whereUser['promote_id'] = ['IN', $promoteId]; + $promoteIds = M("promote", "tab_") + ->where(array('chain' => ['like', $this->loginPromote['chain'] . $promoteId . '/%'])) + ->getField('id', true); + $promoteIds[] = $promoteId; + $map['promote_id'] = ['IN', $promoteIds]; if (in_array($type, [1, 2])) { + $whereUser['promote_id'] = $map['promote_id']; if ($type == 1) { $pay_time = total(1); $start = mktime(0, 0, 0, date('m'), date('d'), date('Y')); @@ -271,78 +270,49 @@ class PromoteController extends BaseController } $whereUser['register_time'] = ['between', array($start, $end - 1)]; $userId = M('user', 'tab_')->where($whereUser)->getField('id', true); - } - if ($userId) { - $map1['user_id'] = $map['user_id'] = ['IN', $userId]; - } else if (!$userId && $type != 0) { - return array('sum_mounth' => 0, 'sum_today' => 0); + if ($userId) { + $map['user_id'] = ['IN', $userId]; + } else if (!$userId && $type != 0) { + return array('sum_mounth' => 0, 'sum_today' => 0); + } } - //获取所有会长 - $promote_map = "`chain` = '%/{$promote_id}/%' OR id = {$promote_id}"; - - $promote = M("promote","tab_")->field("id,account")->where($promote_map)->select(); - $data =array(); - for ($i=0; $i < count($promote); $i++) { - # code... - $proid = M("promote","tab_")->field("id")->where("`chain` like '%/{$promote[$i]['id']}/%'")->select(); - $str = ''; - for($k=0; $kfield(' - floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count, - floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today, + $data = $spend + ->field(' + floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as sum_count, + floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as sum_today, floor(sum(IF(pay_time ' . $yesterday . ',pay_amount,0))*100) as yesterday, - floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week, - floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') - ->where($map) - ->where("pay_time".$pay_time) - ->find(); - $dbdata['promote_account'] = $promote[$i]['account']; - } else { - $dbdata = $spend - ->field(' - floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as count, - floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as today, + floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as sum_week, + floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as sum_mounth') + ->where($map) + ->where("pay_time".$pay_time) + ->find(); + } else { + $data = $spend + ->field(' + floor(sum(IF(pay_time ' . $pay_time . ',pay_amount,0))*100) as sum_count, + floor(sum(IF(pay_time ' . $today . ',pay_amount,0))*100) as sum_today, floor(sum(IF(pay_time ' . $yesterday . ',pay_amount,0))*100) as yesterday, - floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as week, - floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as mounth') - ->where($map) - ->where("pay_time".$pay_time) - ->find(); - $dbdata['promote_account'] = $promote[$i]['account']; - } - $data[] = $dbdata; - } - foreach ($data as $key => $value) { - $value['count'] ?: 0; - $value['today'] ?: 0; - $value['week'] ?: 0; - $value['mounth'] ?: 0; - static $i = 0; - $i++; - $data[$key]['rand'] = $i; - $data[$key]['count'] = $value['count'] / 100; - $data[$key]['today'] = $value['today'] / 100; - $data[$key]['yesterday'] = $value['yesterday'] / 100; - $data[$key]['week'] = $value['week'] / 100; - $data[$key]['mounth'] = $value['mounth'] / 100; - } - $total = $this->data_total($data); + floor(sum(IF(pay_time ' . $week . ',pay_amount,0))*100) as sum_week, + floor(sum(IF(pay_time ' . $mounth . ',pay_amount,0))*100) as sum_mounth') + ->where($map) + ->where("pay_time".$pay_time) + ->find(); + } + $data['sum_count'] = empty($data['sum_count']) ? 0 : bcdiv($data['sum_count'], 100 ,2); + $data['sum_today'] = empty($data['sum_today']) ? 0 : bcdiv($data['sum_today'], 100 ,2); + $data['yesterday'] = empty($data['yesterday']) ? 0 : bcdiv($data['yesterday'], 100 ,2); + $data['sum_week'] = empty($data['sum_week']) ? 0 : bcdiv($data['sum_week'], 100 ,2); + $data['sum_mounth'] = empty($data['sum_mounth']) ? 0 : bcdiv($data['sum_mounth'], 100 ,2); - return $total; + return $data; } public function data_total($data) From 84fc4e367b0e88c55c11cab2de45a6d674a36d49 Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Fri, 6 Dec 2019 10:04:06 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/GameSourceService.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Base/Service/GameSourceService.class.php b/Application/Base/Service/GameSourceService.class.php index 4b29cf111..dcfe7edf7 100644 --- a/Application/Base/Service/GameSourceService.class.php +++ b/Application/Base/Service/GameSourceService.class.php @@ -9,7 +9,7 @@ use GuzzleHttp\Client; class GameSourceService { - const IS_FIXED_IOS13 = true; + const IS_FIXED_IOS13 = false; const DEBUG = true; public function __construct() From 1a8be9429c68ad723e043b34d3dff7bbb6a999b7 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 6 Dec 2019 14:33:16 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/GameSourceService.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Base/Service/GameSourceService.class.php b/Application/Base/Service/GameSourceService.class.php index dcfe7edf7..4b29cf111 100644 --- a/Application/Base/Service/GameSourceService.class.php +++ b/Application/Base/Service/GameSourceService.class.php @@ -9,7 +9,7 @@ use GuzzleHttp\Client; class GameSourceService { - const IS_FIXED_IOS13 = false; + const IS_FIXED_IOS13 = true; const DEBUG = true; public function __construct() From 9c3b872cb9d19c704391277cc35481655e435738 Mon Sep 17 00:00:00 2001 From: "elf@home" <360197197@qq.com> Date: Sat, 7 Dec 2019 00:01:51 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/GameSourceService.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Base/Service/GameSourceService.class.php b/Application/Base/Service/GameSourceService.class.php index 4b29cf111..dcfe7edf7 100644 --- a/Application/Base/Service/GameSourceService.class.php +++ b/Application/Base/Service/GameSourceService.class.php @@ -9,7 +9,7 @@ use GuzzleHttp\Client; class GameSourceService { - const IS_FIXED_IOS13 = true; + const IS_FIXED_IOS13 = false; const DEBUG = true; public function __construct() From f392ad4de081028d7b538fb41529229210001066 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Tue, 10 Dec 2019 16:19:44 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=85=85=E5=80=BC?= =?UTF-8?q?=E8=A1=8C=E4=B8=BA=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BehaviorLogController.class.php | 70 +++ Application/Admin/View/BehaviorLog/index.html | 464 ++++++++++++++++++ 2 files changed, 534 insertions(+) create mode 100644 Application/Admin/Controller/BehaviorLogController.class.php create mode 100644 Application/Admin/View/BehaviorLog/index.html diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php new file mode 100644 index 000000000..1ceafba57 --- /dev/null +++ b/Application/Admin/Controller/BehaviorLogController.class.php @@ -0,0 +1,70 @@ + $v) { + if (!in_array($k, $ignoreData)) { + $map[$k] = $v; + } + } + + $p = $params['p'] ? $params['p'] : 1; + $row = $params['row'] ? $params['row'] : 10; + + $startDate = empty($params['timestart']) ? date('Y-m-d', strtotime('-6 day', time())) : $params['timestart']; + $endDate = empty($params['timeend']) ? date('Y-m-d') : $params['timeend']; + $startTime = strtotime($startDate); + $endTime = strtotime($endDate) + 86399; + $map['create_time'] = array('BETWEEN', [$startTime, $endTime]); + if (I('promote_id')) { + if ($promoteId == 0) { + $map['promote_id'] = 0; + } else { + $promoteMap['chain'] = ['like', "%/$promoteId/%"]; + $promoteIds = M('Promote', 'tab_')->where($promoteMap)->getField('id', true); + $map['promote_id'] = ['in', $promoteIds]; + } + } + $data = M('pay_info', 'tab_')->where($map)->order('id DESC')->page($p, $row)->select(); + $count = M('pay_info', 'tab_')->where($map)->count(); + $page = set_pagination($count, $row); + if ($page) { + $this->assign('_page', $page); + } + $this->assign('startDate', $startDate); + $this->assign('endDate', $endDate); + $this->assign('data', $data); + $this->display('index'); + } + +} diff --git a/Application/Admin/View/BehaviorLog/index.html b/Application/Admin/View/BehaviorLog/index.html new file mode 100644 index 000000000..0ee33fb7f --- /dev/null +++ b/Application/Admin/View/BehaviorLog/index.html @@ -0,0 +1,464 @@ + + + + + + + + + + + +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ + - +
+ + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ + - +
+
+ +
+ + +
+ 搜索 +
+
+ + +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CP订单号充值时间玩家账号游戏名称游戏区服所属推广员角色ID角色名称订单金额
aOh! 暂时还没有内容!
{$vo.extend}{:set_show_time($vo['create_time'])}{$vo.user_account}{$vo.game_name}{$vo.server_name}{$vo.promote_account}{$vo.game_player_id}{$vo.game_player_name}{$vo.price}
+
+
+
+ + {$_page|default=''} +
+ + + +
+ + + + if(C('COLOR_STYLE')=='blue_color') echo ' + + '; + + + + + + + + From f8498638ad8992228620659d9bbc87ff0a5919bb Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Tue, 10 Dec 2019 16:40:56 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=85=85=E5=80=BC?= =?UTF-8?q?=E8=A1=8C=E4=B8=BA=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/BehaviorLogController.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php index 1ceafba57..ec5612d45 100644 --- a/Application/Admin/Controller/BehaviorLogController.class.php +++ b/Application/Admin/Controller/BehaviorLogController.class.php @@ -46,12 +46,15 @@ class BehaviorLogController extends ThinkController $startTime = strtotime($startDate); $endTime = strtotime($endDate) + 86399; $map['create_time'] = array('BETWEEN', [$startTime, $endTime]); - if (I('promote_id')) { + if ($promoteId = I('promote_id')) { if ($promoteId == 0) { $map['promote_id'] = 0; } else { $promoteMap['chain'] = ['like', "%/$promoteId/%"]; $promoteIds = M('Promote', 'tab_')->where($promoteMap)->getField('id', true); + if(empty($promoteIds)) { + $promoteIds[] = $promoteIds; + } $map['promote_id'] = ['in', $promoteIds]; } }