From 6a506540455204f2d40e488853c9b6f215b87df1 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Wed, 18 Nov 2020 15:44:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E7=BB=9F=E8=AE=A1/=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E7=99=BB=E5=BD=95=E6=97=B6=E9=97=B4=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 | 51 ++++++++++++++----- .../Controller/FinanceController.class.php | 47 ++++++++++++----- .../Controller/KuaijieController.class.php | 3 +- Application/Admin/Model/MemberModel.class.php | 2 +- .../Admin/View/Finance/gameStatistics.html | 24 ++++++--- Application/Common/Common/function.php | 3 +- Application/Common/Conf/config.php | 2 +- 7 files changed, 98 insertions(+), 34 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 3247934db..4ef21467d 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -8362,9 +8362,11 @@ class ExportController extends Controller array('inside_cash_count','内充支出'), array('all_cash_count','游戏内充值合计'), array('notice_fail_count','联运通知失败合计'), - array('agg_amount','聚合平台数据'), + array('agg_wm_amount','聚合万盟数据'), + array('agg_wm_failed_amount','聚合万盟通知失败'), array('test_amount','聚合平台测试订单'), - array('agg_failed_amount','聚合通知失败合计'), + array('agg_amount','聚合其他渠道数据'), + array('agg_failed_amount','聚合其他渠道通知失败订单'), ); $map = []; @@ -8451,33 +8453,56 @@ class ExportController extends Controller ]); $aggData = []; + $aggWmData = []; $aggFailData = []; + $aggWmFailData = []; $aggTotal = '0.00'; + $aggWmTotal = '0.00'; $aggFailTotal = '0.00'; + $aggWmFailTotal = '0.00'; if ($result['code'] == '0000') { - $aggData = $result['data']['records']; - $aggFailData = $result['data']['fail_records']; - $aggTotal = $result['data']['total']; - $aggFailTotal = $result['data']['fail_total']; + $aggData = $result['data']['records'] ?? []; + $aggWmData = $result['data']['wm_records'] ?? []; + $aggFailData = $result['data']['fail_records'] ?? []; + $aggWmFailData = $result['data']['wm_fail_records'] ?? []; + $aggTotal = $result['data']['total'] ?? '0.00'; + $aggWmTotal = $result['data']['wm_total'] ?? '0.00'; + $aggFailTotal = $result['data']['fail_total'] ?? '0.00'; + $aggWmFailTotal = $result['data']['wm_fail_total'] ?? '0.00'; } $exceptIds = getAggExceptIds($gameSets); foreach ($xlsData as $key => $value) { $aggAmount = '0.00'; + $aggWmAmount = '0.00'; $aggFailAmount = '0.00'; + $aggWmFailAmount = '0.00'; $testAmount = '0.00'; $deviceType = $value['sdk_version'] == 1 ? 'android' : 'ios'; - if ($value['unique_code'] && isset($aggData[$value['unique_code']]) && isset($aggData[$value['unique_code']][$deviceType])) { - $aggAmount = number_format($aggData[$value['unique_code']][$deviceType], 2, '.', ''); - $aggFailAmount = number_format($aggFailData[$value['unique_code']][$deviceType], 2, '.', ''); + if ($value['unique_code']) { + if (isset($aggData[$value['unique_code']]) && isset($aggData[$value['unique_code']][$deviceType])) { + $aggAmount = number_format($aggData[$value['unique_code']][$deviceType], 2, '.', ''); + } + if (isset($aggWmData[$value['unique_code']]) && isset($aggWmData[$value['unique_code']][$deviceType])) { + $aggWmAmount = number_format($aggWmData[$value['unique_code']][$deviceType], 2, '.', ''); + } + if (isset($aggFailData[$value['unique_code']]) && isset($aggFailData[$value['unique_code']][$deviceType])) { + $aggFailAmount = number_format($aggFailData[$value['unique_code']][$deviceType], 2, '.', ''); + } + if (isset($aggWmFailData[$value['unique_code']]) && isset($aggWmFailData[$value['unique_code']][$deviceType])) { + $aggWmFailAmount = number_format($aggWmFailData[$value['unique_code']][$deviceType], 2, '.', ''); + } + } $xlsData[$key]['agg_amount'] = $aggAmount; + $xlsData[$key]['agg_wm_amount'] = $aggWmAmount; $xlsData[$key]['agg_failed_amount'] = $aggFailAmount; + $xlsData[$key]['agg_wm_failed_amount'] = $aggWmFailAmount; if (isset($gameSets[$value['game_id']]) && isAggGame($gameSets[$value['game_id']]['pay_notify_url'])) { $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; + $xlsData[$key]['balance_coin_count'] = $value['balance_coin_count'] = 0; + $xlsData[$key]['inside_cash_count'] = $value['inside_cash_count'] = 0; $testAmount = $testList[$value['game_id']] ?? '0.00'; } @@ -8518,8 +8543,10 @@ class ExportController extends Controller 'inside_cash_count'=>$sumInside, 'all_cash_count'=>$sumAll, 'notice_fail_count'=>$sumNoticeFail, - 'agg_amount' => $aggTotal, + 'agg_wm_amount' => $aggWmTotal, + 'agg_wm_failed_amount' => $aggWmFailTotal, 'test_amount' => round(floatval($testAllAmount), 2), + 'agg_amount' => $aggTotal, 'agg_failed_amount' => $aggFailTotal, ] ]; diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 6245f8322..89d9016a0 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -788,26 +788,46 @@ class FinanceController extends ThinkController 'device_type' => I("sdk_type", 0), ]); $aggData = []; + $aggWmData = []; $aggFailData = []; + $aggWmFailData = []; $aggTotal = '0.00'; + $aggWmTotal = '0.00'; $aggFailTotal = '0.00'; + $aggWmFailTotal = '0.00'; if ($result['code'] == '0000') { - $aggData = $result['data']['records']; - $aggFailData = $result['data']['fail_records']; - $aggTotal = $result['data']['total']; - $aggFailTotal = $result['data']['fail_total']; + $aggData = $result['data']['records'] ?? []; + $aggWmData = $result['data']['wm_records'] ?? []; + $aggFailData = $result['data']['fail_records'] ?? []; + $aggWmFailData = $result['data']['wm_fail_records'] ?? []; + $aggTotal = $result['data']['total'] ?? '0.00'; + $aggWmTotal = $result['data']['wm_total'] ?? '0.00'; + $aggFailTotal = $result['data']['fail_total'] ?? '0.00'; + $aggWmFailTotal = $result['data']['wm_fail_total'] ?? '0.00'; } $endTime = time(); $exceptIds = getAggExceptIds($gameSets); foreach ($data as $key => $value) { $aggAmount = '0.00'; + $aggWmAmount = '0.00'; $aggFailAmount = '0.00'; + $aggWmFailAmount = '0.00'; $testAmount = '0.00'; $deviceType = $value['sdk_version'] == 1 ? 'android' : 'ios'; - if ($value['unique_code'] && isset($aggData[$value['unique_code']]) && isset($aggData[$value['unique_code']][$deviceType])) { - $aggAmount = number_format($aggData[$value['unique_code']][$deviceType], 2, '.', ''); - $aggFailAmount = number_format($aggFailData[$value['unique_code']][$deviceType], 2, '.', ''); + if ($value['unique_code']) { + if (isset($aggData[$value['unique_code']]) && isset($aggData[$value['unique_code']][$deviceType])) { + $aggAmount = number_format($aggData[$value['unique_code']][$deviceType], 2, '.', ''); + } + if (isset($aggWmData[$value['unique_code']]) && isset($aggWmData[$value['unique_code']][$deviceType])) { + $aggWmAmount = number_format($aggWmData[$value['unique_code']][$deviceType], 2, '.', ''); + } + if (isset($aggFailData[$value['unique_code']]) && isset($aggFailData[$value['unique_code']][$deviceType])) { + $aggFailAmount = number_format($aggFailData[$value['unique_code']][$deviceType], 2, '.', ''); + } + if (isset($aggWmFailData[$value['unique_code']]) && isset($aggWmFailData[$value['unique_code']][$deviceType])) { + $aggWmFailAmount = number_format($aggWmFailData[$value['unique_code']][$deviceType], 2, '.', ''); + } } if (isset($gameSets[$value['game_id']]) && isAggGame($gameSets[$value['game_id']]['pay_notify_url'])) { $data[$key]['cash_count'] = $value['cash_count'] = 0; @@ -816,8 +836,10 @@ class FinanceController extends ThinkController $testAmount = $testList[$value['game_id']] ?? '0.00'; } $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'; - $data[$key]['agg_failed_amount'] = $value['unique_code'] ? $aggFailAmount : '0.00'; + $data[$key]['agg_amount'] = $aggAmount; + $data[$key]['agg_wm_amount'] = $aggWmAmount; + $data[$key]['agg_failed_amount'] = $aggFailAmount; + $data[$key]['agg_wm_failed_amount'] = $aggWmFailAmount; $data[$key]['test_amount'] = $testAmount; } @@ -852,13 +874,14 @@ class FinanceController extends ThinkController $game_types = M("game_type", 'tab_')->field('id, type_name')->select(); - $aggRate = round($aggTotal/($sumAll + $aggTotal) * 100, 2) . '%'; - $allRate = round($sumAll/($sumAll + $aggTotal) * 100, 2) . '%'; - + $aggRate = round(($aggTotal + $aggWmTotal)/($sumAll + $aggTotal + $aggWmTotal) * 100, 2) . '%'; + $allRate = round($sumAll/($sumAll + $aggTotal + $aggWmTotal) * 100, 2) . '%'; $this->assign('testAllAmount', $testAllAmount); $this->assign('aggFailTotal', $aggFailTotal); + $this->assign('aggWmFailTotal', $aggWmFailTotal); $this->assign('aggRate', $aggRate); $this->assign('allRate', $allRate); + $this->assign('aggWmTotal', $aggWmTotal); $this->assign('aggTotal', $aggTotal); $this->assign('game_types', $game_types); $this->assign('sumCash', $sumCash); diff --git a/Application/Admin/Controller/KuaijieController.class.php b/Application/Admin/Controller/KuaijieController.class.php index 4e861d1a5..5dddfc87a 100644 --- a/Application/Admin/Controller/KuaijieController.class.php +++ b/Application/Admin/Controller/KuaijieController.class.php @@ -20,7 +20,8 @@ class KuaijieController extends AdminController { * 频道列表 * @author 麦当苗儿 */ - public function index($p=0){ + public function index($p=0) + { $page = intval($p); $page = $page ? $page : 1; //默认显示第一页数据 diff --git a/Application/Admin/Model/MemberModel.class.php b/Application/Admin/Model/MemberModel.class.php index 52d3e1591..35bef2aa3 100644 --- a/Application/Admin/Model/MemberModel.class.php +++ b/Application/Admin/Model/MemberModel.class.php @@ -88,7 +88,7 @@ class MemberModel extends Model { //登录有效时间改为1小时 $expireTime = 3600; ini_set('session.gc_maxlifetime', $expireTime); - ini_set('session.cookie_lifetime', $expireTime); + ini_set('session.cookie_lifetime', 0); session('user_group_id',$groupId); session('user_auth', $auth); session('user_auth_sign', data_auth_sign($auth)); diff --git a/Application/Admin/View/Finance/gameStatistics.html b/Application/Admin/View/Finance/gameStatistics.html index 52697204c..e4eafb1eb 100644 --- a/Application/Admin/View/Finance/gameStatistics.html +++ b/Application/Admin/View/Finance/gameStatistics.html @@ -176,10 +176,11 @@
游戏内充值合计游戏现金金额+平台币直充支出+平台币内充支出
联运通知失败合计联运所有通知失败的合计金额
-
聚合平台数据包含聚合万盟平台数据,因为聚合平台数据是用接口获取并且涉及其他平台数据,所以只能添加总数据,无法判定平台币还是现金充值
+
聚合万盟数据聚合平台万盟渠道支付成功且通知成功的金额
+
聚合万盟通知失败聚合平台万盟渠道通知失败的订单合计金额
聚合平台测试订单聚合平台测试订单
-
聚合通知失败合计聚合所有通知失败的合计金额
- +
聚合其他渠道数据聚合平台其他渠道(不含万盟)支付成功通知成功订单合计
+
聚合其他渠道通知失败订单聚合平台其他渠道(不含万盟)
通知失败的订单合计金额
操作 @@ -232,7 +233,8 @@ 'game_id'=>$data['game_id'], 'game_name'=>$data['game_name'], 'partner_id'=>$_REQUEST['partner_id'] - ])}">{$data.agg_amount} + ])}">{$data.agg_wm_amount} + {$data.agg_failed_amount}0 {$data.test_amount} + {$data.agg_amount} {$data.agg_failed_amount}0 {$sumInside}0 {$sumAll}0 {$sumNoticeFail}0 - {$aggTotal} + {$aggWmTotal} + {$aggWmFailTotal}0 {$testAllAmount}0 + {$aggTotal} {$aggFailTotal}0 联运渠道数据:{$sumAll} 占比:{$allRate} 聚合渠道数据:{$aggTotal} 占比:{$aggRate}

+

联运渠道数据:{$sumAll} 占比:{$allRate} 聚合渠道数据:{$aggTotal + $aggWmTotal} 占比:{$aggRate}

diff --git a/Application/Common/Common/function.php b/Application/Common/Common/function.php index 7e21fa50b..04b978be9 100644 --- a/Application/Common/Common/function.php +++ b/Application/Common/Common/function.php @@ -35,7 +35,8 @@ function is_login() session('user_group_id', null); return 0; } else { - session('user_auth_expire', time() + $expire); + $expiredTime = time() + $expire; + session('user_auth_expire', $expiredTime); } return session('user_auth_sign') == data_auth_sign($user) ? $user['uid'] : 0; } diff --git a/Application/Common/Conf/config.php b/Application/Common/Conf/config.php index 02bc95be5..90383c743 100644 --- a/Application/Common/Conf/config.php +++ b/Application/Common/Conf/config.php @@ -90,7 +90,7 @@ $config = array( // session 配置数组 支持type name id path expire domain 等参数 'SESSION_OPTIONS' => array( - 'expire' => 7200 + // 'expire' => 3600 ), ); $config = array_merge($config, $env);