From e1b93a987bd4242af07ebe2f54495ae4c7bcb7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E7=94=A8lww?= <“529520975@qq.com> Date: Mon, 25 Nov 2019 11:36:04 +0800 Subject: [PATCH 01/20] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BF=87=E5=A4=A7=EF=BC=8C=E9=85=8D=E7=BD=AE=E5=8A=A0=E5=A4=A7?= =?UTF-8?q?=E5=86=85=E5=AD=98=E9=99=90=E5=88=B6=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/ExportController.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 9f99ad237..a12055796 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -38,6 +38,7 @@ class ExportController extends Controller //导出Excel function expUser($id) { + ini_set("memory_limit","256M"); //升级为256M内存 $xlsName = $_REQUEST['xlsname']; switch ($id) { case 1: From f2c8986cd746ba8be8f2e57d1ee4f4abbab12990 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 25 Nov 2019 11:41:42 +0800 Subject: [PATCH 02/20] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=84=9A=E6=9C=AC->?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E8=A7=92=E8=89=B2=E5=85=85=E5=80=BC=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/AutoController.class.php | 58 ++++++++++++++----- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php index b442ad320..272885e65 100644 --- a/Application/Admin/Controller/AutoController.class.php +++ b/Application/Admin/Controller/AutoController.class.php @@ -894,27 +894,55 @@ public function auto_rrdae(){ public function userPlayDataCount() { $time = strtotime(date('Y-m-d 00:00:00', time() - (3600 * 24))); - $spendMap['pay_status'] = 1; - $spendMap['pay_game_status'] = 1; - $spendMap['game_player_id'] = ['gt', 0]; - $spendMap['pay_time'] = ['between', [$time, strtotime(date('Y-m-d 23:59:59', $time))]]; + $res = M('user_play_data_count', 'tab_')->where(array('create_time' => $time))->find(); + if (empty($res)) { + $spendMap['pay_status'] = 1; + $spendMap['pay_game_status'] = 1; + $spendMap['game_player_id'] = ['gt', 0]; + $spendMap['pay_time'] = ['between', [$time, strtotime(date('Y-m-d 23:59:59', $time))]]; + + $this->userPlayDataCountByMap($spendMap); + } + } + + //根据时间统计玩家充值--初始 + public function userPlayDataCountInitial() + { + $res = M('user_play_data_count', 'tab_')->order('id asc')->find(); + if (empty($res)) { + $time = strtotime(date('Y-m-d 00:00:00', time())); + $spendMap['pay_status'] = 1; + $spendMap['pay_game_status'] = 1; + $spendMap['game_player_id'] = ['gt', 0]; + $spendMap['pay_time'] = ['lt', $time]; + + $this->userPlayDataCountByMap($spendMap); + echo '初始化成功'; + } else { + echo '表存在记录,无法初始化'; + } + } + private function userPlayDataCountByMap($map) + { $field = 'FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,game_id,server_id,game_player_id,sum(pay_amount) as recharge_cost,count(id) as recharge_count'; $spendCostData = M('spend', 'tab_')->field($field) - ->where($spendMap) + ->where($map) ->group('day,game_player_id,server_id,game_id') ->select(); - $data = []; - foreach ($spendCostData as $list) { - $save['game_id'] = $list['game_id']; - $save['server_id'] = $list['server_id']; - $save['role_id'] = $list['game_player_id']; - $save['recharge_cost'] = $list['recharge_cost']; - $save['recharge_count'] = $list['recharge_count']; - $save['create_time'] = strtotime($list['day']); - $data[] = $save; + if (!empty($spendCostData)) { + $data = []; + foreach ($spendCostData as $list) { + $save['game_id'] = $list['game_id']; + $save['server_id'] = $list['server_id']; + $save['role_id'] = $list['game_player_id']; + $save['recharge_cost'] = $list['recharge_cost']; + $save['recharge_count'] = $list['recharge_count']; + $save['create_time'] = strtotime($list['day']); + $data[] = $save; + } + M('user_play_data_count', 'tab_')->addAll($data); } - M('user_play_data_count', 'tab_')->addAll($data); } } From 855e943ccb82c7b2367496e15e87f0c385d5eea4 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 25 Nov 2019 11:43:57 +0800 Subject: [PATCH 03/20] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=84=9A=E6=9C=AC->?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E8=A7=92=E8=89=B2=E5=85=85=E5=80=BC=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/AutoController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php index 272885e65..4ad4af173 100644 --- a/Application/Admin/Controller/AutoController.class.php +++ b/Application/Admin/Controller/AutoController.class.php @@ -905,7 +905,7 @@ public function auto_rrdae(){ } } - //根据时间统计玩家充值--初始 + //根据时间统计玩家充值--初始化 public function userPlayDataCountInitial() { $res = M('user_play_data_count', 'tab_')->order('id asc')->find(); From f75188f9526f720fa26d1b32315b936d6028f4c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=E7=94=A8lww?= <“529520975@qq.com> Date: Mon, 25 Nov 2019 11:47:40 +0800 Subject: [PATCH 04/20] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=A2=9E=E5=8A=A0=E5=86=85=E5=AD=98=E9=99=90?= =?UTF-8?q?=E5=88=B6=E5=88=B0512M?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/ExportController.class.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index a12055796..15e65f361 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -5,6 +5,17 @@ use Think\Controller; class ExportController extends Controller { + + /** + * ExportController constructor. + */ + public function __construct() + { + parent::__construct(); + set_time_limit(0); + ini_set('memory_limit', '512M'); + } + public function exportExcel($expTitle, $expCellName, $expTableData) { $xlsTitle = iconv('utf-8', 'gb2312', $expTitle);//文件名称 @@ -38,7 +49,6 @@ class ExportController extends Controller //导出Excel function expUser($id) { - ini_set("memory_limit","256M"); //升级为256M内存 $xlsName = $_REQUEST['xlsname']; switch ($id) { case 1: @@ -5563,8 +5573,8 @@ if ($key == 'model'){ function gameFinanceDetail() { - set_time_limit(0); - ini_set('memory_limit', '512M'); +// set_time_limit(0); +// ini_set('memory_limit', '512M'); $month = I("game_name"); $xlsName = $month.'充值流水'; From 3d3bfce9475f608062fe6f741247cdc267793665 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 25 Nov 2019 11:48:58 +0800 Subject: [PATCH 05/20] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=84=9A=E6=9C=AC->?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E8=A7=92=E8=89=B2=E5=85=85=E5=80=BC=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/AutoController.class.php | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php index 4ad4af173..1c04e0d46 100644 --- a/Application/Admin/Controller/AutoController.class.php +++ b/Application/Admin/Controller/AutoController.class.php @@ -896,9 +896,6 @@ public function auto_rrdae(){ $time = strtotime(date('Y-m-d 00:00:00', time() - (3600 * 24))); $res = M('user_play_data_count', 'tab_')->where(array('create_time' => $time))->find(); if (empty($res)) { - $spendMap['pay_status'] = 1; - $spendMap['pay_game_status'] = 1; - $spendMap['game_player_id'] = ['gt', 0]; $spendMap['pay_time'] = ['between', [$time, strtotime(date('Y-m-d 23:59:59', $time))]]; $this->userPlayDataCountByMap($spendMap); @@ -911,9 +908,6 @@ public function auto_rrdae(){ $res = M('user_play_data_count', 'tab_')->order('id asc')->find(); if (empty($res)) { $time = strtotime(date('Y-m-d 00:00:00', time())); - $spendMap['pay_status'] = 1; - $spendMap['pay_game_status'] = 1; - $spendMap['game_player_id'] = ['gt', 0]; $spendMap['pay_time'] = ['lt', $time]; $this->userPlayDataCountByMap($spendMap); @@ -925,24 +919,29 @@ public function auto_rrdae(){ private function userPlayDataCountByMap($map) { - $field = 'FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,game_id,server_id,game_player_id,sum(pay_amount) as recharge_cost,count(id) as recharge_count'; - $spendCostData = M('spend', 'tab_')->field($field) - ->where($map) - ->group('day,game_player_id,server_id,game_id') - ->select(); - - if (!empty($spendCostData)) { - $data = []; - foreach ($spendCostData as $list) { - $save['game_id'] = $list['game_id']; - $save['server_id'] = $list['server_id']; - $save['role_id'] = $list['game_player_id']; - $save['recharge_cost'] = $list['recharge_cost']; - $save['recharge_count'] = $list['recharge_count']; - $save['create_time'] = strtotime($list['day']); - $data[] = $save; + if (isset($map['pay_time'])) { + $map['pay_status'] = 1; + $map['pay_game_status'] = 1; + $map['game_player_id'] = ['gt', 0]; + $field = 'FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,game_id,server_id,game_player_id,sum(pay_amount) as recharge_cost,count(id) as recharge_count'; + $spendCostData = M('spend', 'tab_')->field($field) + ->where($map) + ->group('day,game_player_id,server_id,game_id') + ->select(); + + if (!empty($spendCostData)) { + $data = []; + foreach ($spendCostData as $list) { + $save['game_id'] = $list['game_id']; + $save['server_id'] = $list['server_id']; + $save['role_id'] = $list['game_player_id']; + $save['recharge_cost'] = $list['recharge_cost']; + $save['recharge_count'] = $list['recharge_count']; + $save['create_time'] = strtotime($list['day']); + $data[] = $save; + } + M('user_play_data_count', 'tab_')->addAll($data); } - M('user_play_data_count', 'tab_')->addAll($data); } } } From 30d9c305227f3361a14de9d9d4b58dde9c300248 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 25 Nov 2019 11:50:54 +0800 Subject: [PATCH 06/20] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=84=9A=E6=9C=AC->?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E8=A7=92=E8=89=B2=E5=85=85=E5=80=BC=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/AutoController.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php index 1c04e0d46..7a8902207 100644 --- a/Application/Admin/Controller/AutoController.class.php +++ b/Application/Admin/Controller/AutoController.class.php @@ -896,9 +896,9 @@ public function auto_rrdae(){ $time = strtotime(date('Y-m-d 00:00:00', time() - (3600 * 24))); $res = M('user_play_data_count', 'tab_')->where(array('create_time' => $time))->find(); if (empty($res)) { - $spendMap['pay_time'] = ['between', [$time, strtotime(date('Y-m-d 23:59:59', $time))]]; + $map['pay_time'] = ['between', [$time, strtotime(date('Y-m-d 23:59:59', $time))]]; - $this->userPlayDataCountByMap($spendMap); + $this->userPlayDataCountByMap($map); } } @@ -908,9 +908,9 @@ public function auto_rrdae(){ $res = M('user_play_data_count', 'tab_')->order('id asc')->find(); if (empty($res)) { $time = strtotime(date('Y-m-d 00:00:00', time())); - $spendMap['pay_time'] = ['lt', $time]; + $map['pay_time'] = ['lt', $time]; - $this->userPlayDataCountByMap($spendMap); + $this->userPlayDataCountByMap($map); echo '初始化成功'; } else { echo '表存在记录,无法初始化'; From 3a867f60e3050cb8c0d5373dc8e472bd1776cb8c Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 25 Nov 2019 11:59:04 +0800 Subject: [PATCH 07/20] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=84=9A=E6=9C=AC->?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E8=A7=92=E8=89=B2=E5=85=85=E5=80=BC=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/AutoController.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php index 7a8902207..8bdd063ae 100644 --- a/Application/Admin/Controller/AutoController.class.php +++ b/Application/Admin/Controller/AutoController.class.php @@ -924,14 +924,14 @@ public function auto_rrdae(){ $map['pay_game_status'] = 1; $map['game_player_id'] = ['gt', 0]; $field = 'FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,game_id,server_id,game_player_id,sum(pay_amount) as recharge_cost,count(id) as recharge_count'; - $spendCostData = M('spend', 'tab_')->field($field) + $spendData = M('spend', 'tab_')->field($field) ->where($map) ->group('day,game_player_id,server_id,game_id') ->select(); - if (!empty($spendCostData)) { + if (!empty($spendData)) { $data = []; - foreach ($spendCostData as $list) { + foreach ($spendData as $list) { $save['game_id'] = $list['game_id']; $save['server_id'] = $list['server_id']; $save['role_id'] = $list['game_player_id']; From b52113622d2d8f4f419ae040e0e58b34b8990095 Mon Sep 17 00:00:00 2001 From: chenzhi <“chenzhi063@qq.com> Date: Mon, 25 Nov 2019 14:08:48 +0800 Subject: [PATCH 08/20] =?UTF-8?q?[bug]=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E6=8E=A8=E5=B9=BF=E5=91=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 9281b6a0c..14903a25e 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -1064,7 +1064,7 @@ function get_promote_parent($promote_id,$field='account'){ function get_promote_parent_acc($promote_id){ $Promote = M('promote','tab_'); - $data = $Promote->field('account,parent_id')->find($promote_id); + $data = $Promote->field('account,parent_id,chain')->find($promote_id); if(empty($data)){ return $data["account"]="官方渠道";exit; From e35ada1a5d0217a1d416d998974227db068a0bec Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 25 Nov 2019 15:25:03 +0800 Subject: [PATCH 09/20] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0->?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E4=B8=AD=E5=BF=83->=E7=BC=96=E8=BE=91--?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 12 +-- .../Home/View/default/Promote/addPromote.html | 2 +- .../Home/View/default/Promote/edit_chlid.html | 90 +------------------ 3 files changed, 9 insertions(+), 95 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 8b2338baa..59b2f1a13 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1308,15 +1308,15 @@ class QueryController extends BaseController $allData['spend_user_num'] = $spendRepository->getPayUserCountByGame($params);//充值人数 $allData['spend_num'] = $spendRepository->getPayCountByGame($params);//充值次数 unset($params['pay_way']); - $allData['spend_all_amount'] = $spendRepository->getPayAmountByGameAndType($params);//充值总额 + $allData['spend_all_amount'] = null_to_0($spendRepository->getPayAmountByGameAndType($params));//充值总额 $params['pay_way'] = ['in', '1,2,3,4,5,6']; - $allData['spend_cash'] = $spendRepository->getPayAmountByGameAndType($params);//现金充值 + $allData['spend_cash'] = null_to_0($spendRepository->getPayAmountByGameAndType($params));//现金充值 $params['pay_way'] = 0; - $allData['spend_generic'] = $spendRepository->getPayAmountByGameAndType($params);//通用币充值 + $allData['spend_generic'] = null_to_0($spendRepository->getPayAmountByGameAndType($params));//通用币充值 $params['pay_way'] = -1; - $allData['spend_binding'] = $spendRepository->getPayAmountByGameAndType($params);//绑定币充值 - $allData['spend_discount'] = 0; - $allData['spend_voucher'] = 0; + $allData['spend_binding'] = null_to_0($spendRepository->getPayAmountByGameAndType($params));//绑定币充值 + $allData['spend_discount'] = '0.00'; + $allData['spend_voucher'] = '0.00'; } } diff --git a/Application/Home/View/default/Promote/addPromote.html b/Application/Home/View/default/Promote/addPromote.html index f7efe5517..e718cc779 100644 --- a/Application/Home/View/default/Promote/addPromote.html +++ b/Application/Home/View/default/Promote/addPromote.html @@ -77,7 +77,7 @@ - + 返回 diff --git a/Application/Home/View/default/Promote/edit_chlid.html b/Application/Home/View/default/Promote/edit_chlid.html index 46df37f5f..28da228f8 100644 --- a/Application/Home/View/default/Promote/edit_chlid.html +++ b/Application/Home/View/default/Promote/edit_chlid.html @@ -16,7 +16,7 @@