From b36515a720e788d5ee2ff9673e9c12fbf3f01093 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 25 Mar 2020 11:33:50 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=B7=A5=E4=BC=9A=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/FinancePromote/index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Application/Admin/View/FinancePromote/index.html b/Application/Admin/View/FinancePromote/index.html index 4c66fc343..cbab12f2f 100644 --- a/Application/Admin/View/FinancePromote/index.html +++ b/Application/Admin/View/FinancePromote/index.html @@ -233,6 +233,11 @@ + 游戏查看 From e0c946e67c51a74fea9f18bf1dd2ced480d6c1a6 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 25 Mar 2020 11:40:02 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=B7=A5=E4=BC=9A=E7=BB=9F=E8=AE=A12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/FinancePromote/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Application/Admin/View/FinancePromote/index.html b/Application/Admin/View/FinancePromote/index.html index cbab12f2f..8c670d355 100644 --- a/Application/Admin/View/FinancePromote/index.html +++ b/Application/Admin/View/FinancePromote/index.html @@ -233,16 +233,16 @@ - - + From 751357feef682d16413c591827842bacb8c1d32c Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 25 Mar 2020 12:10:49 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/PayChannelController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index b305ff4b3..c607c47c7 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -874,7 +874,7 @@ class PayChannelController extends ThinkController foreach ($xlsData as $k => $v) { if ($model == 'spend') { $v['game_name'] =clearGameNameType($v['game_name']); - $v['sdk_version'] =getGameTypeName($v[$key]['sdk_version']); + $v['sdk_version'] =getGameTypeName($v['sdk_version']); } $v['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']); $v['pay_way'] = get_pay_way($v['pay_way']); From 6c8f9351707d57b4c2533ea9be48d485c28b2c17 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 25 Mar 2020 13:48:33 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=B8=A0=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PayChannelController.class.php | 49 ++++++++++++------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index c607c47c7..a68392888 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -175,7 +175,7 @@ class PayChannelController extends ThinkController $bindRechargeData['pay_amount'] = $bindRechargeData['pay_amount']?$bindRechargeData['pay_amount']:0; $offcialData['sum'] = $offcialData['pay_amount']+$bindRechargeData['pay_amount']; - $offcialData['pay_amount'] = $offcialData['pay_amount']+$bindRechargeData['pay_amount']-$offcialData['test_coin']; + $offcialData['pay_amount'] = number_format($offcialData['pay_amount']+$bindRechargeData['pay_amount']-$offcialData['test_coin'],2,'.',''); $this->assign('offcialData',$offcialData); @@ -187,8 +187,8 @@ class PayChannelController extends ThinkController ->field("0 as game_name,sum(pay_amount) as pay_amount,0 as platform_coin,id as test_coin") ->where($spreadMap) ->find(); - $spreadData['pay_amount'] = $spreadData['pay_amount']?$spreadData['pay_amount']:0; - $spreadData['sum'] = $spreadData['pay_amount']; + $spreadData['pay_amount'] = $spreadData['pay_amount']?number_format($spreadData['pay_amount'],2,'.',''):'0.00'; + $spreadData['sum'] = number_format($spreadData['pay_amount'],2,'.',''); $this->assign('spreadData',$spreadData); @@ -232,6 +232,8 @@ class PayChannelController extends ThinkController // $channelData[$testOrderChannelData['pay_way']]['pay_amount'] = number_format($testOrderChannelData['pay_amount'],2,'.',''); $testorderChannelArr[$trkey]['pay_amount'] = number_format($testOrderChannelData['pay_amount'],2,'.',''); $testorderChannelArr[$trkey]['pay_way'] = get_pay_way($testOrderChannelData['pay_way']); + $channelData[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.',''); + $channelData[$key]['pay_way'] = get_pay_way($value['pay_way']); } else { $channelData[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.',''); @@ -275,24 +277,23 @@ class PayChannelController extends ThinkController } //汇总计算 - $sumData['pay_amount'] += $value['pay_amount'] - $value['test_coin']; - $sumData['platform_coin'] += $handleCoinData[$value['game_id']]?$handleCoinData[$value['game_id']]:0; - $sumData['test_coin'] += $handleTestData[$value['game_id']]?$handleTestData[$value['game_id']]:0; - $sumData['test_platform_coin'] +=$handleTestCoinData[$value['game_id']]?$handleTestCoinData[$value['game_id']]:0; + $sumData['pay_amount'] += number_format($value['pay_amount'] - $value['test_coin'],2,'.',''); + $sumData['platform_coin'] += $handleCoinData[$value['game_id']]?number_format($handleCoinData[$value['game_id']],2,'.',''):0; + $sumData['test_coin'] += $handleTestData[$value['game_id']]?number_format($handleTestData[$value['game_id']],2,'.',''):0; + $sumData['test_platform_coin'] +=$handleTestCoinData[$value['game_id']]?number_format($handleTestCoinData[$value['game_id']],2,'.',''):0; } // 汇总数据 if ($_REQUEST['game_id']) { - $sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin']; - $sumData['test_coin'] = $sumData['test_coin']+$sumData['test_platform_coin']; - $sumData['sum'] = $sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin']; + $sumData['platform_coin'] = number_format($sumData['platform_coin'] - $sumData['test_platform_coin'],2,'.',''); + $sumData['test_coin'] = number_format($sumData['test_coin']+$sumData['test_platform_coin'],2,'.',''); + $sumData['sum'] = number_format($sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin'],2,'.',''); } else { - $sumData['pay_amount'] = $sumData['pay_amount'] + $superSignData['pay_amount'] + $bindRechargeData['pay_amount']; - $sumData['platform_coin'] = $sumData['platform_coin'] - $sumData['test_platform_coin'] + - $offcialData['pay_amount'] + $spreadData['pay_amount']; - $sumData['test_coin'] = $sumData['test_coin']+$offcialTestCost+$testSuperSignCost+$sumData['test_platform_coin']; - $sumData['sum'] = $sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin']; - $coinSum = $coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost; + $sumData['pay_amount'] = number_format($sumData['pay_amount'] + $superSignData['pay_amount'] + $bindRechargeData['pay_amount'],2,'.',''); + $sumData['platform_coin'] = number_format($sumData['platform_coin'] - $sumData['test_platform_coin'] + $offcialData['pay_amount'] + $spreadData['pay_amount'],2,'.',''); + $sumData['test_coin'] = number_format($sumData['test_coin']+$offcialTestCost+$testSuperSignCost+$sumData['test_platform_coin'],2,'.',''); + $sumData['sum'] = number_format($sumData['pay_amount'] +$sumData['test_coin'] + $sumData['platform_coin'],2,'.',''); + $coinSum = number_format($coinSum + $offcialData['pay_amount'] + $spreadData['pay_amount']+$offcialTestCost,2,'.',''); } $sum_pay_amount = M('test_order', 'tab_')->where($maptestorder)->field('sum(pay_amount) as sum_order_amount')->find(); @@ -337,7 +338,18 @@ class PayChannelController extends ThinkController } $payTypeDataExport['sdk_version'] .= "平台币直充总金额(2019.12.18号以前的不显示在列表中,此项也不计入充值方式统计):". ($coinSum); - + if ($sum_platform_pay_amount['sum_order_amount'] != 0) { + $testOrderDataExport['pay_amount'] = $sum_noplatform_pay_amount['sum_order_amount']; + }else { + $testOrderDataExport['pay_amount'] = '0.00'; + } + if ($sum_noplatform_pay_amount['sum_order_amount'] != 0) { + $testOrderDataExport['platform_coin'] = $sum_platform_pay_amount['sum_order_amount']; + }else { + $testOrderDataExport['platform_coin'] = '0.00'; + } + $testOrderDataExport['test_coin'] = '0.00'; + $testOrderDataExport['sum'] = '0.00'; $channelDataExport['game_name'] = '支付渠道'; $channelDataExport2['game_name'] = '支付渠道占比'; foreach($channelData as $key => $value) { @@ -382,7 +394,8 @@ class PayChannelController extends ThinkController $this->assign('listdata',$data); //统计总额和比例 $this->assign('channelData2',$channelData); - $this->assign('sum_pay_amount',$sum_pay_amount); + $this->assign('sum_platform_pay_amount',$sum_platform_pay_amount); + $this->assign('sum_noplatform_pay_amount',$sum_noplatform_pay_amount); $moneyAllCount = array_sum(array_column($channelData, 'pay_amount')); $this->assign('moneyAllCount',$moneyAllCount); $this->display(); From 6f7e0de83d4649f9f1eb3dcac815c429e602ff96 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 25 Mar 2020 14:43:26 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E5=B8=81=E8=AE=BE=E5=A4=87=EF=BC=8C=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/function.php | 3 +++ .../Admin/Controller/FinancePromoteController.class.php | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index 18a0546c0..0d85156b8 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -894,6 +894,9 @@ function clearGameNameType($game_name) //设备名称词典 function getGameTypeName($id,$chinese=true) { + if(!$id){ + return '无'; + } $android = 'Android'; $ios = 'ios'; if($chinese){ diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index 3a3fe5c64..73a4f30c2 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -461,6 +461,10 @@ class FinancePromoteController extends AdminController $value['sdk_version'] =getGameTypeName($value['sdk_version']); if(!$value['game_name']) $value['game_name'] = "无"; + //按类型判断pid + if($_REQUEST['promote_type'] == 2 && $_REQUEST['promote_id']){ + $value['p_id'] = $_REQUEST['promote_id']; + } } if (isset($_REQUEST['export'])) { @@ -1013,6 +1017,7 @@ class FinancePromoteController extends AdminController } $_POST['promote_level'] = $level; // } + // dd($map); } From c45ca2942db6a5d8581e0ffd9afe62f6677c6f1e Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 25 Mar 2020 14:47:42 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/function.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index 0d85156b8..f03c268e7 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -894,7 +894,7 @@ function clearGameNameType($game_name) //设备名称词典 function getGameTypeName($id,$chinese=true) { - if(!$id){ + if(empty($id)){ return '无'; } $android = 'Android';