游戏统计/后台登录时间修改

master
ELF 4 years ago
parent da2dc09690
commit 6a50654045

@ -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,
]
];

@ -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);

@ -20,7 +20,8 @@ class KuaijieController extends AdminController {
* 频道列表
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
public function index($p=0){
public function index($p=0)
{
$page = intval($p);
$page = $page ? $page : 1; //默认显示第一页数据

@ -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));

@ -176,10 +176,11 @@
<th ><div class="tooltip">游戏内充值合计<span class="tooltiptext"><span style="margin-left: -10px">游戏现金金额+平台币直充支出+平台币内充支出</span></span></div></th>
<th ><div class="tooltip"><span style="color: red">联运通知失败合计</span><span class="tooltiptext"><span style="margin-left: -10px">联运所有通知失败的合计金额</span></span></div></th>
<th ><div class="tooltip">聚合平台数据<span class="tooltiptext"><span style="margin-left: -10px">包含聚合万盟平台数据,因为聚合平台数据是用接口获取并且涉及其他平台数据,所以只能添加总数据,无法判定平台币还是现金充值</span></span></div></th>
<th ><div class="tooltip">聚合万盟数据<span class="tooltiptext"><span style="margin-left: -10px">聚合平台万盟渠道支付成功且通知成功的金额</span></span></div></th>
<th ><div class="tooltip"><span style="color: red">聚合万盟通知失败</span><span class="tooltiptext"><span style="margin-left: -10px">聚合平台万盟渠道通知失败的订单合计金额</span></span></div></th>
<th ><div class="tooltip">聚合平台测试订单<span class="tooltiptext"><span style="margin-left: -10px">聚合平台测试订单</span></span></div></th>
<th ><div class="tooltip"><span style="color: red">聚合通知失败合计</span><span class="tooltiptext"><span style="margin-left: -10px">聚合所有通知失败的合计金额</span></span></div></th>
<th ><div class="tooltip">聚合其他渠道数据<span class="tooltiptext"><span style="margin-left: -10px">聚合平台其他渠道(不含万盟)支付成功通知成功订单合计</span></span></div></th>
<th ><div class="tooltip"><span style="color: red">聚合其他渠道通知失败订单</span><span class="tooltiptext"><span style="margin-left: -10px">聚合平台其他渠道(不含万盟)<br>通知失败的订单合计金额</span></span></div></th>
<th >操作</th>
</tr>
</thead>
@ -232,7 +233,8 @@
'game_id'=>$data['game_id'],
'game_name'=>$data['game_name'],
'partner_id'=>$_REQUEST['partner_id']
])}">{$data.agg_amount}</a></td>
])}">{$data.agg_wm_amount}</a></td>
<td ><span style="color:red;"><if condition="$data.agg_wm_failed_amount neq ''">{$data.agg_failed_amount}<else/>0</if></span></td>
<td ><span style="color:red;">
<a href="{:U('TestOrder/lists', [
'timestart'=>$_GET['timestart'],
@ -242,6 +244,14 @@
'platform_type'=>2,
])}">{$data.test_amount}</a></span>
</td>
<td ><a href="{:U('Finance/aggDetail', [
'timestart'=>$_GET['timestart'],
'timeend'=>$_GET['timeend'],
'sdk_type'=>$_GET['sdk_type'],
'game_id'=>$data['game_id'],
'game_name'=>$data['game_name'],
'partner_id'=>$_REQUEST['partner_id']
])}">{$data.agg_amount}</a></td>
<td ><span style="color:red;"><if condition="$data.agg_failed_amount neq ''">{$data.agg_failed_amount}<else/>0</if></span></td>
<td >
<a href="{:U('Finance/gameStatisticsDetail',array(
@ -262,8 +272,10 @@
<td><if condition="$sumInside neq ''">{$sumInside}<else/>0</if></td>
<td><if condition="$sumAll neq ''">{$sumAll}<else/>0</if></td>
<td><span style="color: red"><if condition="$sumNoticeFail neq ''">{$sumNoticeFail}<else/>0</if></span></td>
<td>{$aggTotal}</td>
<td>{$aggWmTotal}</td>
<td><span style="color: red"><if condition="$aggWmFailTotal neq ''">{$aggWmFailTotal}<else/>0</if></span></td>
<td><span style="color: red"><if condition="$testAllAmount neq ''">{$testAllAmount}<else/>0</if></span></td>
<td>{$aggTotal}</td>
<td><span style="color: red"><if condition="$aggFailTotal neq ''">{$aggFailTotal}<else/>0</if></span></td>
<td>
<a href="{:U('Finance/gameStatisticsDetail',
@ -281,7 +293,7 @@
</tbody>
</table>
<p style="text-align: center; margin-top: 5px;">联运渠道数据:{$sumAll} 占比:{$allRate} 聚合渠道数据:{$aggTotal} 占比:{$aggRate}</p>
<p style="text-align: center; margin-top: 5px;">联运渠道数据:{$sumAll} 占比:{$allRate} 聚合渠道数据:{$aggTotal + $aggWmTotal} 占比:{$aggRate}</p>
</div>
</div>
<div class="page">

@ -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;
}

@ -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);

Loading…
Cancel
Save