Merge branch 'release-1.0.0' of 47.111.118.107:/srv/git/platform into release-1.0.0

master
zhanglingsheng 5 years ago
commit ae66cf5008

@ -1196,13 +1196,14 @@ class DownloadController extends BaseController {
empty(I('extend')) || $map['tab_pay_info.extend'] = I('extend');
empty(I('user_id')) || $map['tab_pay_info.game_player_id'] = I('user_id');
if (!empty($begTime) && !empty($endTime)) {
$map['tab_pay_info.create_time'] = ['between', [strtotime($begTime), strtotime($endTime) - 1]];
$map['tab_pay_info.create_time'] = ['between', [strtotime($begTime), strtotime($endTime) +24*3600- 1]];
}else if (empty($begTime) && !empty($endTime)) {
$map['tab_pay_info.create_time'] = ['elt',strtotime($endTime)];
$map['tab_pay_info.create_time'] = ['elt',strtotime($endTime) + 24*3600];
}else if (!empty($begTime) && empty($endTime)) {
$map['tab_pay_info.create_time'] = ['EGT',strtotime($begTime)];
$map['tab_pay_info.create_time'] = ['EGT',strtotime($begTime) + 24*3600];
}
$conditions = json_encode($map,TRUE);
$addtime = time();
$data = [
@ -1896,13 +1897,16 @@ class DownloadController extends BaseController {
foreach($data as $key => $v) {
$v['create_time'] = date('Y-m-d H:i:s',$v['create_time']);
$promoteInfo = M('promote','tab_')->field("nickname")->where(['id' => intval($v['promote_id'])])->find();
$serverId = $v['server_id'];
$gameId = $v['game_id'];
$serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId,'game_id'=>$gameId])->find();
$v['promote_id']= $promoteInfo['nickname'];
$csvData['extend'] = $this->encryption($v['extend']);
$csvData['create_time'] = $v['create_time'];
$csvData['user_account'] = $v['user_account'];
$csvData['game_name'] = $v['game_name'];
$csvData['promote_id'] = $v['promote_id'];
$csvData['server_name'] = $v['server_name'];
$csvData['server_name'] = $serverInfo['server_name'];
$csvData['user_id'] = $v['game_player_id'];
$csvData['game_player_name'] = $v['game_player_name'];
$csvData['price'] = $v['price'];

@ -60,11 +60,11 @@ class PlayersController extends BaseController {
$map['tab_pay_info.game_player_id'] = $userId;
}
if (!empty($begTime) && !empty($endTime)) {
$map['tab_pay_info.create_time'] = ['between', [$begTime, $endTime - 1]];
$map['tab_pay_info.create_time'] = ['between', [$begTime, $endTime + 24*3600 - 1]];
}else if (empty($begTime) && !empty($endTime)) {
$map['tab_pay_info.create_time'] = ['elt',$endTime];
$map['tab_pay_info.create_time'] = ['elt',$endTime + 24*3600];
}else if (!empty($begTime) && empty($endTime)) {
$map['tab_pay_info.create_time'] = ['EGT',$begTime];
$map['tab_pay_info.create_time'] = ['EGT',$begTime + 24*3600];
}
$page = intval(I('get.p', 1));
$page = $page ? $page : 1; //默认显示第一页数据arraypage
@ -73,8 +73,12 @@ class PlayersController extends BaseController {
foreach($rs as $key => $v) {
$rs[$key]['extend'] = encryption($v['extend']);
$rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']);
$promoteInfo = M('promote','tab_')->field("nickname")->where(['id' => intval($v['promote_id'])])->find();
$rs[$key]['promote_id']= $promoteInfo['nickname'];
$promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find();
$serverId = $v['server_id'];
$gameId = $v['game_id'];
$serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId,'game_id'=>$gameId])->find();
$rs[$key]['server_name'] = $serverInfo['server_name'];
$rs[$key]['promote_id']= $promoteInfo['account'];
}
$count = M('pay_info', 'tab_')
->field('tab_pay_info.id')

@ -211,6 +211,7 @@ class QueryController extends BaseController
$parameter['level_promote_3'] = $levelPromote[1];
$parameter['level_promote_4'] = $levelPromote[2];
!isset($_REQUEST['pay_way']) || $parameter['pay_way'] = I('pay_way');
!isset($_REQUEST['pay_status']) || $parameter['pay_status'] = I('pay_status', -1);
$serverData = $this->getServer(I('relation_game_id'), I('sdk_version'));
$page = set_pagination($count, $row, $parameter);
@ -1857,7 +1858,7 @@ class QueryController extends BaseController
}
$map['uc.create_time'] = ['between', [$begTime, $endTime - 1]];
$fieldUC = "sum(uc.recharge_cost) recharge_cost,sum(uc.recharge_count) recharge_count,sum(if(uc.create_time = {$nowTime},uc.recharge_cost,0)) as recharge_cost_today";
$fieldUC = "sum(uc.recharge_cost) recharge_cost,sum(uc.recharge_count) recharge_count,sum(if(uc.create_time = {$nowTime},uc.recharge_cost,0)) as recharge_cost_today,uc.user_id";
$fieldUI = "ui.user_account,ui.game_name,ui.role_name,ui.role_level,ui.server_name,ui.play_time,ui.play_ip,ui.promote_account,ui.sdk_version,ui.create_time";
$loginRecordMap['lr.create_time'] = $map['uc.create_time'];
@ -1869,22 +1870,32 @@ class QueryController extends BaseController
$field = $fieldUC . ',' . $fieldUI . ',' . $fieldLR . ' as user_game_login_count';
$subQuery = M('user_play_data_count', 'tab_')->alias('uc')
->field($field)
->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id')
->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.role_id = uc.role_id')
->where($map)
->group('uc.role_id,uc.server_id,uc.game_id')
->group('uc.role_id,uc.game_id,uc.user_id,uc.id')
->buildSql();
$query = M()->alias('record')
->table($subQuery)
->order($orderBy);
$total = M('user_play_data_count', 'tab_')->alias('uc')
list($records, $pagination, $count) = $this->paginate($query);
$totalQuery = M('user_play_data_count', 'tab_')->alias('uc')
->field($fieldUC)
->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id')
->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and uc.server_id = ui.server_id and ui.role_id = uc.role_id')
->group('uc.role_id,uc.game_id,uc.server_id,uc.user_id,uc.id')
->where($map)
->buildSql();
$total = M()->alias('totals')
->table($totalQuery)
->field('sum(recharge_cost) recharge_cost,sum(recharge_count) recharge_count,sum(recharge_cost_today) as recharge_cost_today')
->find();
list($records, $pagination, $count) = $this->paginate($query);
foreach ($records as &$list) {
if (empty($list['user_account']) ) {
$list['user_account'] = M('user', 'tab_')->where("id = {$list['user_id']}")->getField('account');
$list['user_account'] = empty($list['user_account']) ? '--' : encryption($list['user_account']);
}
$list['user_account'] = empty($list['user_account']) ? '--' : encryption($list['user_account']);
$list['game_name'] = empty($list['game_name']) ? '--' : $list['game_name'];
$list['sdk_version'] = empty($list['sdk_version']) ? '--' : getSDKTypeName($list['sdk_version']);
@ -1897,7 +1908,6 @@ class QueryController extends BaseController
$list['promote_account'] = empty($list['promote_account']) ? '--' : $list['promote_account'];
}
}
$games = get_promote_serach_game();
$this->assign('games', $games);

@ -876,9 +876,20 @@
fontname: 'Ubuntu',
fontcolor: '#ff9818',
};
var logo = $(linkTag).parents('.game-li').eq(0).find('.img-box').children('img')[0]
$('#game_link_ercode').empty().qrcode(options);
$("#game_link_ercode canvas")[0].getContext('2d').drawImage(logo, (qrcodeWidth - logoWidth) / 2, (qrcodeHeight - logoHeight) / 2, logoWidth, logoHeight);
var logo = null;
var logoSrc = $(linkTag).parents('.game-li').eq(0).find('.img-box').children('img').attr('src');
console.log(isImg(logoSrc));
if (isImg(logoSrc)) {
logo = $(linkTag).parents('.game-li').eq(0).find('.img-box').children('img')[0]
} else {
var img = document.createElement('img');
img.src = '__IMG__/game_icon.png';
logo = img;
}
$('#game_link_ercode').empty().qrcode(options);
$("#game_link_ercode canvas")[0].getContext('2d').drawImage(logo, (qrcodeWidth - logoWidth) / 2, (qrcodeHeight - logoHeight) / 2, logoWidth, logoHeight);
$('#clipboard-btn').attr('data-text', response.data.url)
$('#clipboard-btn').click()
@ -896,6 +907,15 @@
});
});
function isImg(src) {
var img = new Image();
img.src = src;
if (img.width > 0 || img.height > 0) {
return true;
}
return false;
}
var clipboard = new ClipboardJS('#clipboard-btn', {
text: function(trigger) {
return trigger.getAttribute('data-text');

@ -109,7 +109,7 @@
<?php endif;?>
<?php endif;?>
<?php if(in_array($record['id'], $hasPlayerList)):?>
<?php if(false && in_array($record['id'], $hasPlayerList)):?>
<?php if(!in_array($record['id'], $hasShiftPlayerList)):?>
<a href="javascript:;" class="shift-player-btn editbtn">玩家迁移</a>
<?php else:?>

@ -94,7 +94,7 @@
<a href="javascript:;" style="color: red;" class="cancel-shift-btn editbtn">取消渠道迁移</a>
<?php endif;?>
<?php endif;?>
<?php if(in_array($vo['id'], $hasPlayerList)):?>
<?php if(false && in_array($vo['id'], $hasPlayerList)):?>
<?php if(!in_array($vo['id'], $hasShiftPlayerList)):?>
<a href="javascript:;" class="shift-player-btn editbtn">玩家迁移</a>
<?php else:?>

Loading…
Cancel
Save