From e34d28e2c820a2f7b662794d658735e86dde9846 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 3 Aug 2020 13:04:45 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/ExportController.class.php | 26 ++++++++++++-- .../Controller/FinanceController.class.php | 34 +++++++++++++++++-- Application/Common/Common/extend.php | 8 +++++ 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 3e430fb47..2cf7457d2 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -8279,11 +8279,14 @@ class ExportController extends Controller $map = []; + $searchGameIds = null; $game_ids = array_column(getGameByName(I("game_name"), I("sdk_type")), 'id'); if ($game_ids) { $map['s.game_id'] = ['in', $game_ids]; + $searchGameIds = $game_ids; } + if (!empty(I('partner_id'))) { $map['g.partner_id'] = I('partner_id'); } @@ -8303,20 +8306,39 @@ class ExportController extends Controller if (!empty(I('game_type_id'))) { $map['g.game_type_id'] = I('game_type_id'); + $searchGameIds = M('game', 'tab_')->where(['game_type_id' => I('game_type_id', 0)])->getField('id', true); } $xlsData = D("spend")->gameStatistics($map); $uniqueCodes = array_column($xlsData, 'unique_code'); + $gameIds = array_column($data, 'game_id'); $uniqueCodes = array_filter($uniqueCodes, function($value) { if ($value) { return true; } return false; }); + + $gameSets = []; + if (count($gameIds) > 0) { + $gameSets = M('game_set', 'tab_')->field(['game_id', 'pay_notify_url'])->where(['game_id' => ['in', $gameIds]])->select(); + $gameSets = index_by_column('game_id', $gameSets); + } + + $searchGameCodes = []; + if (count($searchGameIds) > 0) { + $searchGameCodes = M('game', 'tab_')->where(['id' => ['in', $searchGameIds], 'unique_code' => ['neq', '']])->getField('unique_code', true); + $searchGameCodes = array_unique($searchGameCodes); + } $client = new AggregateClient(); - $result = $client->api('game-data', ['unique_codes' => $uniqueCodes, 'started_at' => I('timestart', ''), 'ended_at' => I('timeend', '')]); + $result = $client->api('game-data', [ + 'unique_codes' => $uniqueCodes, + 'started_at' => I('timestart', ''), + 'ended_at' => I('timeend', ''), + 'search_games' => $searchGameCodes, + ]); $aggData = []; $aggTotal = '0.00'; if ($result['code'] == '0000') { @@ -8332,7 +8354,7 @@ class ExportController extends Controller $aggAmount = number_format($aggData[$value['unique_code']][$deviceType], 2, '.', ''); } $xlsData[$key]['agg_amount'] = $aggAmount; - if ($aggAmount != '0.00') { + if (isset($gameSets[$value['game_id']]) && isAggGame($gameSets[$value['game_id']]['pay_notify_url'])) { $value['cash_count'] = 0; $value['balance_coin_count'] = 0; $value['inside_cash_count'] = 0; diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 4cfd24076..a47e7bdfa 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -707,9 +707,11 @@ class FinanceController extends ThinkController $map = []; + $searchGameIds = null; $game_ids = array_column(getGameByName(I("game_name"), I("sdk_type")), 'id'); if ($game_ids) { $map['s.game_id'] = ['in', $game_ids]; + $searchGameIds = $game_ids; } if (!empty(I('partner_id'))) { @@ -731,10 +733,13 @@ class FinanceController extends ThinkController if (!empty(I('game_type_id'))) { $map['g.game_type_id'] = I('game_type_id'); + $searchGameIds = M('game', 'tab_')->where(['game_type_id' => I('game_type_id', 0)])->getField('id', true); } + $startTime = time(); //游戏统计列表 $data = D("spend")->gameStatistics($map, $row, $p); + $gameIds = array_column($data, 'game_id'); $uniqueCodes = array_column($data, 'unique_code'); $uniqueCodes = array_filter($uniqueCodes, function($value) { if ($value) { @@ -743,8 +748,32 @@ class FinanceController extends ThinkController return false; }); + $gameSets = []; + if (count($gameIds) > 0) { + $gameSets = M('game_set', 'tab_')->field(['game_id', 'pay_notify_url'])->where(['game_id' => ['in', $gameIds]])->select(); + $gameSets = index_by_column('game_id', $gameSets); + } + + $searchGameCodes = []; + if (count($searchGameIds) > 0) { + $searchGameCodes = M('game', 'tab_')->where(['id' => ['in', $searchGameIds], 'unique_code' => ['neq', '']])->getField('unique_code', true); + $searchGameCodes = array_unique($searchGameCodes); + } + + var_dump([ + 'unique_codes' => $uniqueCodes, + 'started_at' => I('timestart', ''), + 'ended_at' => I('timeend', ''), + 'search_games' => $searchGameCodes, + ]); + $client = new AggregateClient(); - $result = $client->api('game-data', ['unique_codes' => $uniqueCodes, 'started_at' => I('timestart', ''), 'ended_at' => I('timeend', '')]); + $result = $client->api('game-data', [ + 'unique_codes' => $uniqueCodes, + 'started_at' => I('timestart', ''), + 'ended_at' => I('timeend', ''), + 'search_games' => $searchGameCodes, + ]); $aggData = []; $aggTotal = '0.00'; if ($result['code'] == '0000') { @@ -760,7 +789,8 @@ class FinanceController extends ThinkController if ($value['unique_code'] && isset($aggData[$value['unique_code']]) && isset($aggData[$value['unique_code']][$deviceType])) { $aggAmount = number_format($aggData[$value['unique_code']][$deviceType], 2, '.', ''); } - if ($aggAmount != '0.00') { + // if ($aggAmount != '0.00') { + if (isset($gameSets[$value['game_id']]) && isAggGame($gameSets[$value['game_id']]['pay_notify_url'])) { $data[$key]['cash_count'] = $value['cash_count'] = 0; $data[$key]['balance_coin_count'] = $value['balance_coin_count'] = 0; $data[$key]['inside_cash_count'] = $value['inside_cash_count'] = 0; diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index 526108922..127fdec6f 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -3029,4 +3029,12 @@ function db2csv(&$data,$title,$header=false){ function hideRealName($realName) { return mb_strlen($realName,'utf-8') == 2 ? mb_substr($realName,0,1,'utf-8').'*':mb_substr($realName,0,1,'utf-8').'**'; +} + +function isAggGame($payUrl) +{ + if (strpos($payUrl, 'sdk-pay-a.wmtxkj') !== false || strpos($payUrl, 'sdk-pay-i.wmtxkj') !== false ) { + return true; + } + return false; } \ No newline at end of file From 7471dcf3386086e418959c82e7a85a6f0a498ae2 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 3 Aug 2020 13:47:31 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/FinanceController.class.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index a47e7bdfa..ab1fee944 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -760,13 +760,6 @@ class FinanceController extends ThinkController $searchGameCodes = array_unique($searchGameCodes); } - var_dump([ - 'unique_codes' => $uniqueCodes, - 'started_at' => I('timestart', ''), - 'ended_at' => I('timeend', ''), - 'search_games' => $searchGameCodes, - ]); - $client = new AggregateClient(); $result = $client->api('game-data', [ 'unique_codes' => $uniqueCodes, From 0ee5ea3c021dff83d3b56981059dc259f0830227 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 3 Aug 2020 14:49:43 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/ExportController.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 2cf7457d2..8babe453d 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -8355,9 +8355,9 @@ class ExportController extends Controller } $xlsData[$key]['agg_amount'] = $aggAmount; if (isset($gameSets[$value['game_id']]) && isAggGame($gameSets[$value['game_id']]['pay_notify_url'])) { - $value['cash_count'] = 0; - $value['balance_coin_count'] = 0; - $value['inside_cash_count'] = 0; + $xlsData[$key]['cash_count'] = $value['cash_count'] = 0; + $xlsData[$key]['balance_coin_count'] =$value['balance_coin_count'] = 0; + $xlsData[$key]['inside_cash_count'] =$value['inside_cash_count'] = 0; $exceptIds[] = $value['game_id']; } // $xlsData[$key]['game_name'] = substr($value["game_name"],0,strrpos($value["game_name"],'(')); From 6ac8a0a9b34c6fe2e0593787d6d79adcbcfe7fea Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 3 Aug 2020 14:56:11 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/ExportController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 8babe453d..643bf08a4 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -8312,7 +8312,7 @@ class ExportController extends Controller $xlsData = D("spend")->gameStatistics($map); $uniqueCodes = array_column($xlsData, 'unique_code'); - $gameIds = array_column($data, 'game_id'); + $gameIds = array_column($xlsData, 'game_id'); $uniqueCodes = array_filter($uniqueCodes, function($value) { if ($value) { return true; From 744512574587332bce255ce2b74d01cb3e6417ad Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 3 Aug 2020 15:34:05 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/ExportController.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 643bf08a4..a71ccb7af 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -8293,7 +8293,7 @@ class ExportController extends Controller if (!empty(I('timestart'))) { $timestart = strtotime(I('timestart')); - $map['_string'] = "s.pay_time >= {$timestart}"; + $map['_string'] = "s.payed_time >= {$timestart}"; } if (!empty(I('timeend'))) { @@ -8301,7 +8301,7 @@ class ExportController extends Controller if (!empty($map['_string'])) { $map['_string'] .= " and "; } - $map['_string'] .= " s.pay_time < {$timeend}"; + $map['_string'] .= " s.payed_time < {$timeend}"; } if (!empty(I('game_type_id'))) { From 83a1d34b2c2e5c96b6ee369e5806e609eb9dac41 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 3 Aug 2020 15:49:34 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/ExportController.class.php | 7 ++----- .../Admin/Controller/FinanceController.class.php | 10 ++++------ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index a71ccb7af..069ed57ae 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -8320,11 +8320,8 @@ class ExportController extends Controller return false; }); - $gameSets = []; - if (count($gameIds) > 0) { - $gameSets = M('game_set', 'tab_')->field(['game_id', 'pay_notify_url'])->where(['game_id' => ['in', $gameIds]])->select(); - $gameSets = index_by_column('game_id', $gameSets); - } + $gameSets = M('game_set', 'tab_')->field(['game_id', 'pay_notify_url'])->where(['game_id' => ['in', $gameIds]])->select(); + $gameSets = index_by_column('game_id', $gameSets); $searchGameCodes = []; if (count($searchGameIds) > 0) { diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index ab1fee944..6bd50aa47 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -748,17 +748,15 @@ class FinanceController extends ThinkController return false; }); - $gameSets = []; - if (count($gameIds) > 0) { - $gameSets = M('game_set', 'tab_')->field(['game_id', 'pay_notify_url'])->where(['game_id' => ['in', $gameIds]])->select(); - $gameSets = index_by_column('game_id', $gameSets); - } - + $gameSets = M('game_set', 'tab_')->field(['game_id', 'pay_notify_url'])->select(); + $gameSets = index_by_column('game_id', $gameSets); + $searchGameCodes = []; if (count($searchGameIds) > 0) { $searchGameCodes = M('game', 'tab_')->where(['id' => ['in', $searchGameIds], 'unique_code' => ['neq', '']])->getField('unique_code', true); $searchGameCodes = array_unique($searchGameCodes); } + var_dump($gameSets);die(); $client = new AggregateClient(); $result = $client->api('game-data', [ From 8e40b43696b314236ea4a7b98858056bb3a4e124 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 3 Aug 2020 15:49:51 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/FinanceController.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 6bd50aa47..5c9d9e249 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -750,13 +750,12 @@ class FinanceController extends ThinkController $gameSets = M('game_set', 'tab_')->field(['game_id', 'pay_notify_url'])->select(); $gameSets = index_by_column('game_id', $gameSets); - + $searchGameCodes = []; if (count($searchGameIds) > 0) { $searchGameCodes = M('game', 'tab_')->where(['id' => ['in', $searchGameIds], 'unique_code' => ['neq', '']])->getField('unique_code', true); $searchGameCodes = array_unique($searchGameCodes); } - var_dump($gameSets);die(); $client = new AggregateClient(); $result = $client->api('game-data', [ From 95672ffc905ede8b4a1b4490b7c408a1c8b9952e Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 3 Aug 2020 16:08:02 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/ExportController.class.php | 3 +-- .../Admin/Controller/FinanceController.class.php | 3 +-- Application/Common/Common/extend.php | 11 +++++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 069ed57ae..e05aa5125 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -8343,7 +8343,7 @@ class ExportController extends Controller $aggTotal = $result['data']['total']; } - $exceptIds = []; + $exceptIds = getAggExceptIds($gameSets); foreach ($xlsData as $key => $value) { $aggAmount = '0.00'; $deviceType = $value['sdk_version'] == 1 ? 'android' : 'ios'; @@ -8355,7 +8355,6 @@ class ExportController extends Controller $xlsData[$key]['cash_count'] = $value['cash_count'] = 0; $xlsData[$key]['balance_coin_count'] =$value['balance_coin_count'] = 0; $xlsData[$key]['inside_cash_count'] =$value['inside_cash_count'] = 0; - $exceptIds[] = $value['game_id']; } // $xlsData[$key]['game_name'] = substr($value["game_name"],0,strrpos($value["game_name"],'(')); $xlsData[$key]['all_cash_count'] = $value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count']; diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 5c9d9e249..3940b4203 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -772,7 +772,7 @@ class FinanceController extends ThinkController } $endTime = time(); - $exceptIds = []; + $exceptIds = getAggExceptIds($gameSets); foreach ($data as $key => $value) { $aggAmount = '0.00'; $deviceType = $value['sdk_version'] == 1 ? 'android' : 'ios'; @@ -784,7 +784,6 @@ class FinanceController extends ThinkController $data[$key]['cash_count'] = $value['cash_count'] = 0; $data[$key]['balance_coin_count'] = $value['balance_coin_count'] = 0; $data[$key]['inside_cash_count'] = $value['inside_cash_count'] = 0; - $exceptIds[] = $value['game_id']; } $data[$key]['all_cash_count'] = number_format($value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count'],2,'.',''); $data[$key]['agg_amount'] = $value['unique_code'] ? $aggAmount : '0.00'; diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index 127fdec6f..6a50765dc 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -3037,4 +3037,15 @@ function isAggGame($payUrl) return true; } return false; +} + +function getAggExceptIds($gameSettings) +{ + $exceptIds = []; + foreach ($gameSettings as $setting) { + if (isAggGame($setting['pay_notify_url'])) { + $exceptIds[] = $setting['game_id']; + } + } + return $exceptIds; } \ No newline at end of file From 08c4d82b0027d56f865e8280dcdd8e0f9ad2457e Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Tue, 4 Aug 2020 15:45:39 +0800 Subject: [PATCH 09/11] upt --- Application/Home/Controller/SafeController.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index c4ddb5e71..07ec33d96 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -415,7 +415,7 @@ class SafeController extends BaseController{ $bank = $_REQUEST["bank_card"]; //银行账号 $bank_name = $_REQUEST["bank_name"]; //开户银行 $bank_account = $_REQUEST['bank_account']; //银行账户名 - $agreementpic = $_REQUEST["agreementpic"]; + $agreementpic = $_REQUEST["agreementpic"] ?? ''; $alipayaccount = $_REQUEST['alipay_account']; $alipayrealname = $_REQUEST['alipay_real_name']; @@ -482,10 +482,10 @@ class SafeController extends BaseController{ $this->error('卡号格式错误'); return false; } - if(empty($agreementpic)) { - $this->error("补充协议不能为空"); - return false; - } + // if(empty($agreementpic)) { + // $this->error("补充协议不能为空"); + // return false; + // } if (empty($alipayaccount)) { $this->error('支付宝账户不能为空'); return false; @@ -519,7 +519,7 @@ class SafeController extends BaseController{ $data['alipay_real_name'] = $alipayrealname; // $data['agreementpic'] = $ - $data['anothpic'] = $agreementpic; + $agreementpic ? $data['anothpic'] = $agreementpic : null; $id = get_pid(); $updateRs = M("promote","tab_")->where(['id'=>$id])->save($data); if($updateRs) { From b71c81d764b1f2f06b8ca0a031393727b0659719 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 4 Aug 2020 18:25:17 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/FinanceController.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 3940b4203..ffd4d0b9a 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -709,13 +709,15 @@ class FinanceController extends ThinkController $searchGameIds = null; $game_ids = array_column(getGameByName(I("game_name"), I("sdk_type")), 'id'); + $gameWhere = []; if ($game_ids) { $map['s.game_id'] = ['in', $game_ids]; - $searchGameIds = $game_ids; + $gameWhere['id'] = ['in', $game_ids]; } if (!empty(I('partner_id'))) { $map['g.partner_id'] = I('partner_id'); + $gameWhere['partner_id'] = I('partner_id'); } if (!empty(I('timestart'))) { @@ -733,9 +735,10 @@ class FinanceController extends ThinkController if (!empty(I('game_type_id'))) { $map['g.game_type_id'] = I('game_type_id'); - $searchGameIds = M('game', 'tab_')->where(['game_type_id' => I('game_type_id', 0)])->getField('id', true); + $gameWhere['game_type_id'] = I('game_type_id', 0); } - + + $searchGameIds = M('game', 'tab_')->where($gameWhere)->getField('id', true); $startTime = time(); //游戏统计列表 $data = D("spend")->gameStatistics($map, $row, $p); From 672b2762288b73c3c652838e020afe39c5c9e05c Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 4 Aug 2020 18:53:36 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/ExportController.class.php | 9 +++++++-- Application/Admin/Controller/FinanceController.class.php | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index e05aa5125..1cc106976 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -8281,14 +8281,16 @@ class ExportController extends Controller $searchGameIds = null; $game_ids = array_column(getGameByName(I("game_name"), I("sdk_type")), 'id'); + $gameWhere = []; if ($game_ids) { $map['s.game_id'] = ['in', $game_ids]; - $searchGameIds = $game_ids; + $gameWhere['id'] = ['in', $game_ids]; } if (!empty(I('partner_id'))) { $map['g.partner_id'] = I('partner_id'); + $gameWhere['partner_id'] = I('partner_id'); } if (!empty(I('timestart'))) { @@ -8306,8 +8308,10 @@ class ExportController extends Controller if (!empty(I('game_type_id'))) { $map['g.game_type_id'] = I('game_type_id'); - $searchGameIds = M('game', 'tab_')->where(['game_type_id' => I('game_type_id', 0)])->getField('id', true); + $gameWhere['game_type_id'] = I('game_type_id', 0); } + + $searchGameIds = M('game', 'tab_')->where($gameWhere)->getField('id', true); $xlsData = D("spend")->gameStatistics($map); @@ -8335,6 +8339,7 @@ class ExportController extends Controller 'started_at' => I('timestart', ''), 'ended_at' => I('timeend', ''), 'search_games' => $searchGameCodes, + 'device_type' => I("sdk_type", 0), ]); $aggData = []; $aggTotal = '0.00'; diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index ffd4d0b9a..862140bae 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -766,6 +766,7 @@ class FinanceController extends ThinkController 'started_at' => I('timestart', ''), 'ended_at' => I('timeend', ''), 'search_games' => $searchGameCodes, + 'device_type' => I("sdk_type", 0), ]); $aggData = []; $aggTotal = '0.00';