Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
chenzhi 5 years ago
commit 93c3c13017

@ -3419,80 +3419,127 @@ if ($key == 'model'){
* 登录记录
* @author 鹿文学
*/
public function login_record() {
public function login_record() {
$xlsName = $_REQUEST['xlsname'];
$xlsName = $_REQUEST['xlsname'];
$xlsCell = array(
array('user_account','玩家账号'),
array('game_name','游戏名称'),
array('server_name','游戏区服'),
array('user_nickname','角色名'),
array('login_time','登录时间'),
array('login_ip','最后登录ip'),
);
// $xlsCell = array(
// array('user_account','玩家账号'),
// array('game_name','游戏名称'),
// array('server_name','游戏区服'),
// array('user_nickname','角色名'),
// array('login_time','登录时间'),
// array('login_ip','最后登录ip'),
// );
$xlsCell = array(
'玩家账号',
'游戏名称',
'游戏区服',
'角色名',
'登录时间',
'最后登录ip',
);
if (isset($_REQUEST['login_ip'])) {
$map['login_ip'] = $_REQUEST['login_ip'];
}
if (isset($_REQUEST['game_id'])) {
$map['game_id'] = $_REQUEST['game_id'];
}
if (isset($_REQUEST['game_name'])) {
$map['game_name'] = ['like', $_REQUEST['game_name']."%"];
unset($_REQUEST['game_name']);
}
if (isset($_REQUEST['game_type'])) {
$map['sdk_version'] = $_REQUEST['game_type'];
unset($_REQUEST['game_type']);
}
if (isset($_REQUEST['server_name'])) {
$map['server_name'] = $_REQUEST['server_name'];
unset($_REQUEST['server_name']);
}
if (isset($_REQUEST['timestart']) && isset($_REQUEST['timeend'])) {
$map['login_time'] = array('BETWEEN', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 24 * 60 * 60 - 1));
}elseif(isset($_REQUEST['timestart'])){
$map['login_time'] = array('GT',strtotime($_REQUEST['timestart']));
}elseif(isset($_REQUEST['timeend'])){
$map['login_time'] = array('lt',(strtotime($_REQUEST['timeend'])+ 24 * 60 * 60 - 1));
}
if (isset($_REQUEST['account'])) {
$map['user_account'] = array('like', '%' . trim($_REQUEST['account']) . '%');
}
$map['login_time'] = array('neq', 0);
$page = intval($_REQUEST['p']);
if (isset($_REQUEST['login_ip'])) {
$map['login_ip'] = $_REQUEST['login_ip'];
}
if (isset($_REQUEST['game_id'])) {
$map['game_id'] = $_REQUEST['game_id'];
}
if (isset($_REQUEST['game_name'])) {
$map['game_name'] = ['like', $_REQUEST['game_name']."%"];
unset($_REQUEST['game_name']);
}
if (isset($_REQUEST['game_type'])) {
$map['sdk_version'] = $_REQUEST['game_type'];
unset($_REQUEST['game_type']);
}
if (isset($_REQUEST['server_name'])) {
$map['server_name'] = $_REQUEST['server_name'];
unset($_REQUEST['server_name']);
}
if (isset($_REQUEST['timestart']) && isset($_REQUEST['timeend'])) {
$map['login_time'] = array('BETWEEN', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 24 * 60 * 60 - 1));
}elseif(isset($_REQUEST['timestart'])){
$map['login_time'] = array('GT',strtotime($_REQUEST['timestart']));
}elseif(isset($_REQUEST['timeend'])){
$map['login_time'] = array('lt',(strtotime($_REQUEST['timeend'])+ 24 * 60 * 60 - 1));
}
if (isset($_REQUEST['account'])) {
$map['user_account'] = array('like', '%' . trim($_REQUEST['account']) . '%');
}
$page = $page?$page:1;
// $map['login_time'] = array('neq', 0);
$row = $_REQUEST['row']?$_REQUEST['row']:10;
$page = intval($_REQUEST['p']);
$data = M('UserLoginRecord','tab_')
->where($map)->order('id desc')->select();
$page = $page?$page:1;
$xlsData = [];
$row = $_REQUEST['row']?$_REQUEST['row']:10;
foreach($data as $k => $v) {
$v['login_time'] = date('Y-m-d H:i:s',$v['login_time']);
$v['server_name'] = empty($v['server_name'])?'空':$v['server_name'];
//查询数量
$accessNum = M('UserLoginRecord','tab_')
->where($map)->order('id desc')->count();
$gamename=trim(get_game_name($v['game_id'],'id'));
if ($accessNum > 1000000) {
echo "数据量过大大于100万";die();
}
$v['game_name'] = empty($gamename)?($v['type']==2?'APP登录':'平台登录'):$gamename;
$csvFileName = $xlsName.'.csv';
//设置好告诉浏览器要下载excel文件的headers
header('Content-Description: File Transfer');
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="'. $csvFileName .'"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
$fp = fopen('php://output', 'a');//打开output流
mb_convert_variables('GBK', 'UTF-8', $xlsCell);
fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中
$xlsData[] = $v;
$perSize = 50000;//每次查询的条数
$pages = ceil($accessNum / $perSize);
for($i = 1; $i <= $pages; $i++) {
}
$data = M('UserLoginRecord','tab_')
->field("user_account,game_name,server_name,user_nickname,login_time,login_ip")
->where($map)
->limit(($i-1)*$perSize ,$perSize)
->order('id desc')
->select();
foreach($data as $k => $v) {
$this->exportExcel($xlsName, $xlsCell, $xlsData);
$v['login_time'] = date('Y-m-d H:i:s',$v['login_time']);
$v['server_name'] = empty($v['server_name'])?'空':$v['server_name'];
}
// $gamename=trim(get_game_name($v['game_id'],'id'));
// $v['game_name'] = empty($gamename)?($v['type']==2?'APP登录':'平台登录'):$gamename;
$xlsData[] = $v;
mb_convert_variables('GBK', 'UTF-8', $v);
fputcsv($fp, $v);
}
unset($xlsData);//释放变量的内存
//刷新输出缓冲到浏览器
ob_flush();
flush();//必须同时使用 ob_flush() 和flush() 函数来刷新输出缓冲。
}
// $xlsData = [];
exit();
// $this->exportExcel($xlsName, $xlsCell, $xlsData);
}
/**

@ -94,6 +94,7 @@ class PromoteService {
$shiftIds = isset($params['shift_ids']) && $params['shift_ids'] ? $params['shift_ids'] : [];
$creatorId = isset($params['creator_id']) ? $params['creator_id'] : 0;
$creatorType = isset($params['creator_type']) ? $params['creator_type'] : 0;
$remark = isset($params['remark']) ? $params['remark'] : '';
if ($fromPromoteId == $toPromoteId) {
return [
@ -145,6 +146,7 @@ class PromoteService {
'creator_type' => $creatorType,
'status' => 0,
'type' => $type,
'remark' => $remark,
'shift_ids' => json_encode($shiftIds)
];
@ -303,6 +305,7 @@ class PromoteService {
$fromPromoteId = $task['from_promote_id'];
$orderTime = $task['order_time'];
$shiftIds = json_decode($task['shift_ids'], true) ?? [];
$remark = $task['remark'] ?? '';
$creator = null;
$opAccount = '';
@ -343,7 +346,7 @@ class PromoteService {
'promote_account' => $fromPromote['account'],
'promote_id_to' => $toPromote['id'],
'promote_account_to' => $toPromote['account'],
'remark' => $task['creator_type'] == 0 ? '后台补链' : '玩家迁移',
'remark' => $remark == '' ? ($task['creator_type'] == 0 ? '后台补链' : '玩家迁移') : $remark,
'order_time' => $orderTime,
'create_time' => time(),
'op_id' => $creator ? $creator['id'] : 0,

@ -1727,7 +1727,7 @@ class QueryController extends BaseController
$begTime = strtotime($initBegTime);
$endTime = strtotime($initEndTime);
$endTime += 3600 * 24;
$nowTime = strtotime(date('Y-m-d 00:00:00', time()));
$nowTime = strtotime($nowTime);
$promote = $this->getLoginPromote();
$levelPromote = $this->getLevelPromote();
@ -1842,7 +1842,7 @@ class QueryController extends BaseController
$this->assign('initBegTime', $initBegTime);
$this->assign('initEndTime', $initEndTime);
$this->assign('sort', $sort);
$this->assign('setdate', $nowTime);
$this->assign('setdate', date('Y-m-d', $nowTime));
$this->display('userRecharges');
}

@ -123,7 +123,7 @@
<i class="iconfont iconsort"></i>
</if>
</th>
<th class="sort" sort-name="recharge_cost_today">日充值
<th class="sort" sort-name="recharge_cost_today">日充值
<if condition="'recharge_cost_today' == I('sort_name', '')">
<if condition="1 == $sort">
<i class="iconfont iconsort-down"></i>
@ -201,6 +201,7 @@ $(function(){
$(".select_gallery").select2();
var date = "{$setdate}";
console.log(date);
$('#sdate').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",

@ -98,15 +98,15 @@ class RechargeController extends BaseController
case 'alipay':
//判断是否开启支付宝充值
if (pay_set_status('alipay') == 0) {
$this->error("网站未启用支付宝充值", '', 1);
exit();
// $this->error("网站未启用支付宝充值", '', 1);
// exit();
}
echo $pay->buildRequestForm($vo);
break;
case 'weixin':
if (pay_set_status('wei_xin') == 0 && pay_set_status('weixin') == 0&&pay_set_status('weixin_gf')==0 ) {
$this->error("网站未启用微信充值", '', 1);
exit();
// $this->error("网站未启用微信充值", '', 1);
// exit();
}
if (get_wx_type() == 0) {//微信官方
$data['pay_order_number'] = $data['order_no'];

@ -32,7 +32,7 @@
</div>
<div class="have_product">
<ul >
<volist name="recommend" id="rec" offset="0" length="1">
<volist name="recommend" id="rec">
<li>
<img src="{:get_cover($rec['cover'],'path')}" onerror="this.src='__IMG__/empty.jpg';this.onerror=null"/>
<div class="have_product_box">
@ -42,6 +42,7 @@
</div>
</li>
</volist>
</ul>
</div>
</div>

@ -136,20 +136,25 @@
<div class="way-box">
<div class="way-select">
<if condition="get_tool_status('alipay') eq 1">
<!-- <if condition="get_tool_status('alipay') eq 1">-->
<!-- <div class="wayBg" data-type="alipay">-->
<!-- <img src="__IMG__/zhifubaozhifu.png" alt="">-->
<!-- <span>支付宝</span>-->
<!-- </div>-->
<!-- </if>-->
<!-- <if condition="get_tool_status('weixin') eq 1 or get_tool_status('wei_xin') eq 1 or get_tool_status('weixin_gf') eq 1">-->
<div class="wayBg" data-type="alipay">
<img src="__IMG__/zhifubaozhifu.png" alt="">
<span>支付宝</span>
</div>
</if>
<if condition="get_tool_status('weixin') eq 1 or get_tool_status('wei_xin') eq 1 or get_tool_status('weixin_gf') eq 1">
<div class="" data-type="weixin">
<img src="__IMG__/weixin.png" alt="">
<span>微信支付</span>
</div>
</if>
<!-- </if>-->
<if condition="get_tool_status('jft') eq 1">
<div class="" data-type="jft"><span class="p1_1 g" id="p1">竣付通</span></div>
@ -180,8 +185,8 @@
<img src="__IMG__/foot_logo.png" alt="">
<div class="foot_top_ri">
<div class="foot_link">
<a>家长监护</a>
<a>客服帮助</a>
<a href="/media.php?s=/Article/news1/type/supervise.html">家长监护</a>
<a href="/media.php?s=/Service/index.html">客服帮助</a>
<!-- <a href="#">国浩律所</a>-->
</div>
<div class="foot_serial">

@ -19,7 +19,6 @@
height: 30px;
padding-left: 12px;
padding-right: 30px;
font-size: 1rem;
}
.search-icon {

@ -100,8 +100,12 @@
$(e).removeClass('g-btn').addClass('g-btntn');
var a = setInterval(function() {
r--;
$(e).text('成功'+r + '秒后重发'),
0 == r && ($(e).removeClass('g-btntn').addClass('g-btn'), $(e).text('获取短信验证码'), clearInterval(a))
$(e).text(r + '秒'),
$(e).css("background", "rgba(169,169,169)");
0 == r && ($(e).removeClass('g-btntn').addClass('g-btn'),
$(e).text('获取短信验证码'),
$(e).css("background", "rgba(33,177,235,1)"),
clearInterval(a))
},1e3)
}
};

Loading…
Cancel
Save