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

master
ELF 5 years ago
commit 6e1a768721

@ -12,7 +12,7 @@ class PersonalMenusController extends ThinkController{
{ {
foreach($config as $k => $v) foreach($config as $k => $v)
{ {
$config[$k]['icon'] = is_https()?'https://':'http://' . $_SERVER['SERVER_NAME'] . $v['icon']; $config[$k]['icon'] = is_https()?'https://':'http://' . $_SERVER['HTTP_HOST'] . $v['icon'];
} }
} }
$this->assign('list',$config); $this->assign('list',$config);
@ -95,7 +95,7 @@ class PersonalMenusController extends ThinkController{
{ {
if($v['id'] == $id) if($v['id'] == $id)
{ {
$v['icon'] = is_https()?'https://':'http://' . $_SERVER['SERVER_NAME'] . $v['icon']; $v['icon'] = is_https()?'https://':'http://' . $_SERVER['HTTP_HOST'] . $v['icon'];
$data = $v; $data = $v;
break; break;
} }

@ -12,7 +12,7 @@ class SdkMenuController extends ThinkController{
{ {
foreach($config as $k => $v) foreach($config as $k => $v)
{ {
$config[$k]['icon'] = is_https()?'https://':'http://' . $_SERVER['SERVER_NAME'] . $v['icon']; $config[$k]['icon'] = is_https()?'https://':'http://' . $_SERVER['HTTP_HOST'] . $v['icon'];
} }
} }
$this->assign('list',$config); $this->assign('list',$config);
@ -93,7 +93,7 @@ class SdkMenuController extends ThinkController{
{ {
if($v['id'] == $id) if($v['id'] == $id)
{ {
$v['icon'] = is_https()?'https://':'http://' . $_SERVER['SERVER_NAME'] . $v['icon']; $v['icon'] = is_https()?'https://':'http://' . $_SERVER['HTTP_HOST'] . $v['icon'];
$data = $v; $data = $v;
break; break;
} }

@ -248,9 +248,10 @@ class QueryController extends BaseController
if (!empty($data)) { if (!empty($data)) {
foreach ($data as &$list) { foreach ($data as &$list) {
$newLoginData = M('User', 'tab_') $loginMap['user_id'] = $list['id'];
$newLoginData = M('UserLoginRecord', 'tab_')
->field('login_time,login_ip') ->field('login_time,login_ip')
->where(array('user_id' => $list['id'])) ->where($loginMap)
->order('login_time desc') ->order('login_time desc')
->find(); ->find();
@ -1036,12 +1037,14 @@ class QueryController extends BaseController
$childPromoteIds = getAllChildPromoteList(3); $childPromoteIds = getAllChildPromoteList(3);
if (empty($childPromoteIds)) { if (empty($childPromoteIds)) {
$userPlayInfoWhere['tab_user_play_info.promote_id'] = PID; $userPlayInfoWhere['tab_user_play_info.promote_id'] = PID;
$userPlayInfoWhere2['ti.promote_id'] = PID;
$userGameLoginWhere['tab_user_game_login_record.promote_id'] = PID; $userGameLoginWhere['tab_user_game_login_record.promote_id'] = PID;
$spendWhere['tab_spend.promote_id'] = PID; $spendWhere['tab_spend.promote_id'] = PID;
} else { } else {
$childPromoteIds .= ',' . PID; $childPromoteIds .= ',' . PID;
$userPlayInfoWhere['tab_user_play_info.promote_id'] = ['in', $childPromoteIds]; $userPlayInfoWhere['tab_user_play_info.promote_id'] = ['in', $childPromoteIds];
$userPlayInfoWhere2['ti.promote_id'] = ['in', $childPromoteIds];
$userGameLoginWhere['tab_user_game_login_record.promote_id'] = ['in', $childPromoteIds]; $userGameLoginWhere['tab_user_game_login_record.promote_id'] = ['in', $childPromoteIds];
$spendWhere['tab_spend.promote_id'] = ['in', $childPromoteIds]; $spendWhere['tab_spend.promote_id'] = ['in', $childPromoteIds];
} }
@ -1056,12 +1059,14 @@ class QueryController extends BaseController
$childPromoteIds = getAllChildPromoteList(3, $teamLeaderId); $childPromoteIds = getAllChildPromoteList(3, $teamLeaderId);
if (empty($childPromoteIds)) { if (empty($childPromoteIds)) {
$userPlayInfoWhere['tab_user_play_info.promote_id'] = $teamLeaderId; $userPlayInfoWhere['tab_user_play_info.promote_id'] = $teamLeaderId;
$userPlayInfoWhere2['ti.promote_id'] = $teamLeaderId;
$userGameLoginWhere['tab_user_game_login_record.promote_id'] = $teamLeaderId; $userGameLoginWhere['tab_user_game_login_record.promote_id'] = $teamLeaderId;
$spendWhere['tab_spend.promote_id'] = $teamLeaderId; $spendWhere['tab_spend.promote_id'] = $teamLeaderId;
} else { } else {
$childPromoteIds = $teamLeaderId . ',' . $childPromoteIds; $childPromoteIds = $teamLeaderId . ',' . $childPromoteIds;
$userPlayInfoWhere['tab_user_play_info.promote_id'] = ['in', $childPromoteIds]; $userPlayInfoWhere['tab_user_play_info.promote_id'] = ['in', $childPromoteIds];
$userPlayInfoWhere2['ti.promote_id'] = ['in', $childPromoteIds];
$userGameLoginWhere['tab_user_game_login_record.promote_id'] = ['in', $childPromoteIds]; $userGameLoginWhere['tab_user_game_login_record.promote_id'] = ['in', $childPromoteIds];
$spendWhere['tab_spend.promote_id'] = ['in', $childPromoteIds]; $spendWhere['tab_spend.promote_id'] = ['in', $childPromoteIds];
} }
@ -1075,12 +1080,14 @@ class QueryController extends BaseController
} }
$userPlayInfoWhere['tab_user_play_info.promote_id'] = $promoteId; $userPlayInfoWhere['tab_user_play_info.promote_id'] = $promoteId;
$userPlayInfoWhere2['ti.promote_id'] = $promoteId;
$userGameLoginWhere['tab_user_game_login_record.promote_id'] = $promoteId; $userGameLoginWhere['tab_user_game_login_record.promote_id'] = $promoteId;
$spendWhere['tab_spend.promote_id'] = $promoteId; $spendWhere['tab_spend.promote_id'] = $promoteId;
} }
if (!empty(I('own_id'))) { if (!empty(I('own_id'))) {
$userPlayInfoWhere['tab_user_play_info.promote_id'] = I('own_id'); $userPlayInfoWhere['tab_user_play_info.promote_id'] = I('own_id');
$userPlayInfoWhere2['ti.promote_id'] = I('own_id');
$userGameLoginWhere['tab_user_game_login_record.promote_id'] = I('own_id'); $userGameLoginWhere['tab_user_game_login_record.promote_id'] = I('own_id');
$spendWhere['tab_spend.promote_id'] = I('own_id'); $spendWhere['tab_spend.promote_id'] = I('own_id');
} }
@ -1094,6 +1101,7 @@ class QueryController extends BaseController
if (!empty(I('sdk_version'))) { if (!empty(I('sdk_version'))) {
$userPlayInfoWhere['tab_user_play_info.sdk_version'] = I('sdk_version'); $userPlayInfoWhere['tab_user_play_info.sdk_version'] = I('sdk_version');
$userPlayInfoWhere2['ti.sdk_version'] = I('sdk_version');
$userGameLoginWhere['tab_user_game_login_record.sdk_version'] = I('sdk_version'); $userGameLoginWhere['tab_user_game_login_record.sdk_version'] = I('sdk_version');
$spendWhere['tab_spend.sdk_version'] = I('sdk_version'); $spendWhere['tab_spend.sdk_version'] = I('sdk_version');
} }
@ -1111,6 +1119,7 @@ class QueryController extends BaseController
$spendWhere['tab_spend.pay_status'] = 1; $spendWhere['tab_spend.pay_status'] = 1;
if (!empty(I('server_id'))) { if (!empty(I('server_id'))) {
$userPlayInfoWhere['tab_user_play_info.server_id'] = I('server_id'); $userPlayInfoWhere['tab_user_play_info.server_id'] = I('server_id');
$userPlayInfoWhere2['ti.server_id'] = I('server_id');
$userGameLoginWhere['tab_user_game_login_record.server_id'] = I('server_id'); $userGameLoginWhere['tab_user_game_login_record.server_id'] = I('server_id');
$spendWhere['tab_spend.server_id'] = I('server_id'); $spendWhere['tab_spend.server_id'] = I('server_id');
} }
@ -1135,7 +1144,6 @@ class QueryController extends BaseController
$allData['spend_voucher'] = 0; $allData['spend_voucher'] = 0;
foreach ($data as &$list) { foreach ($data as &$list) {
$thisDateTime = strtotime($list['day']); $thisDateTime = strtotime($list['day']);
$userPlayInfoWhere2 = $userPlayInfoWhere;
$userPlayInfoWhere['tab_user_play_info.create_time'] = ['between', [$thisDateTime, $thisDateTime + 86399]]; $userPlayInfoWhere['tab_user_play_info.create_time'] = ['between', [$thisDateTime, $thisDateTime + 86399]];
$userGameLoginWhere['tab_user_game_login_record.login_time'] = ['between', [$thisDateTime, $thisDateTime + 86399]]; $userGameLoginWhere['tab_user_game_login_record.login_time'] = ['between', [$thisDateTime, $thisDateTime + 86399]];
$spendWhere['tab_spend.pay_time'] = ['between', [$thisDateTime, $thisDateTime + 86399]]; $spendWhere['tab_spend.pay_time'] = ['between', [$thisDateTime, $thisDateTime + 86399]];
@ -1153,35 +1161,53 @@ class QueryController extends BaseController
->group('tab_user_play_info.game_id,tab_user_play_info.user_id') ->group('tab_user_play_info.game_id,tab_user_play_info.user_id')
->select());//创角用户 ->select());//创角用户
$newUserNumSql = $userPlayInfoModel
->table('tab_user_play_info as ti')
->where($userPlayInfoWhere2)
->where('ti.user_id = tab_user_play_info.user_id and ti.game_id = tab_user_play_info.game_id and ti.create_time < ' . $thisDateTime)
->fetchSql(true)
->count();
$newUserNumData = $userPlayInfoModel $newUserNumData = $userPlayInfoModel
->field('tab_user_play_info.create_time') ->field('tab_user_play_info.create_time,(' . $newUserNumSql . ') as num')
->join($join) ->join($join)
->where($userPlayInfoWhere2) ->where($userPlayInfoWhere)
->where($map) ->where($map)
->group('tab_user_play_info.user_id') ->group('tab_user_play_info.user_id')
->having('tab_user_play_info.create_time between ' . $thisDateTime . ' and ' . ($thisDateTime + 86399)) ->having('num = 0')
->order('tab_user_play_info.id') ->order('tab_user_play_info.id')
->select(); ->select();
$list['new_user_num'] = count($newUserNumData);//新创角用户 $list['new_user_num'] = count($newUserNumData);//新创角用户
$newDeviceSql = $userPlayInfoModel
->table('tab_user_play_info as ti')
->where($userPlayInfoWhere2)
->where('ti.create_device_number = tab_user_play_info.create_device_number and ti.game_id = tab_user_play_info.game_id and ti.create_time < ' . $thisDateTime)
->fetchSql(true)
->count();
$newDeviceData = $userPlayInfoModel $newDeviceData = $userPlayInfoModel
->field('tab_user_play_info.create_time') ->field('tab_user_play_info.create_time,(' . $newDeviceSql . ') as num')
->join($join) ->join($join)
->where($userPlayInfoWhere2) ->where($userPlayInfoWhere)
->where($map) ->where($map)
->group('tab_user_play_info.create_device_number') ->group('tab_user_play_info.create_device_number')
->having('tab_user_play_info.create_time between ' . $thisDateTime . ' and ' . ($thisDateTime + 86399)) ->having('num = 0')
->order('tab_user_play_info.id') ->order('tab_user_play_info.id')
->select(); ->select();
$list['new_device_num'] = count($newDeviceData);//新创角设备 $list['new_device_num'] = count($newDeviceData);//新创角设备
$newIpNumSql = $userPlayInfoModel
->table('tab_user_play_info as ti')
->where($userPlayInfoWhere2)
->where('ti.create_ip = tab_user_play_info.create_ip and ti.game_id = tab_user_play_info.game_id and ti.create_time < ' . $thisDateTime)
->fetchSql(true)
->count();
$newIpNumData = $userPlayInfoModel $newIpNumData = $userPlayInfoModel
->field('tab_user_play_info.create_time') ->field('tab_user_play_info.create_time,(' . $newIpNumSql . ') as num')
->join($join) ->join($join)
->where($userPlayInfoWhere2) ->where($userPlayInfoWhere)
->where($map) ->where($map)
->group('tab_user_play_info.create_ip') ->group('tab_user_play_info.create_ip')
->having('tab_user_play_info.create_time between ' . $thisDateTime . ' and ' . ($thisDateTime + 86399)) ->having('num = 0')
->order('tab_user_play_info.id') ->order('tab_user_play_info.id')
->select(); ->select();
$list['new_ip_num'] = count($newIpNumData);//新增创角IP $list['new_ip_num'] = count($newIpNumData);//新增创角IP
@ -1480,9 +1506,10 @@ class QueryController extends BaseController
->select(); ->select();
$list['new_ip_num'] = count($newIpData);//新增创角IP $list['new_ip_num'] = count($newIpData);//新增创角IP
$list['login_user_num'] = $userGameLoginModel $list['login_user_num'] = count($userGameLoginModel
->where($userGameLoginMap) ->where($userGameLoginMap)
->count('distinct tab_user_game_login_record.user_id');//登录用户数 ->group('tab_user_game_login_record.game_id,tab_user_game_login_record.user_id')
->select());//登录用户数
$list['spend_user_num'] = $spendModel $list['spend_user_num'] = $spendModel
->where($spendMap) ->where($spendMap)
@ -2010,7 +2037,7 @@ class QueryController extends BaseController
$subMap['pay_status'] = 1; $subMap['pay_status'] = 1;
$subMap['pay_game_status'] = 1; $subMap['pay_game_status'] = 1;
$subQuery = M('spend', 'tab_')->field('game_player_id')->where($subMap)->group('game_player_id')->having($having)->buildSql(); $subQuery = M('spend', 'tab_')->field('game_player_id')->where($subMap)->group('game_player_id')->having($having)->buildSql();
$map['_string'] = 'role_id in ('. $subQuery . ')'; $map['_string'] = 'role_id in (' . $subQuery . ')';
} }
$query = M('user_play_info', 'tab_')->where($map)->order('play_time desc'); $query = M('user_play_info', 'tab_')->where($map)->order('play_time desc');
list($roles, $pagination, $count) = $this->paginate($query); list($roles, $pagination, $count) = $this->paginate($query);

@ -34,7 +34,7 @@
</span> </span>
</if> </if>
</span> </span>
<span class="fxui-tab-tit <if condition="$type==0">curr</if>"><a href="index.php/Home/TestResource/protectLogList.html">资源号异常日志</a> <span class="fxui-tab-tit <if condition="$type==0">curr</if>"><a href="index.php?s=/Home/TestResource/protectLogList.html">资源号异常日志</a>
<if condition="$rz_count gt 0"> <if condition="$rz_count gt 0">
<span style="width: 25px;height: 25px;float: left;position: relative;bottom:50px;left:125px;text-align: center;background: rgba(255, 0, 0, 1)"> <span style="width: 25px;height: 25px;float: left;position: relative;bottom:50px;left:125px;text-align: center;background: rgba(255, 0, 0, 1)">
<a style="line-height: 25px;padding: 0px;color: #fff">{$rz_count}</a> <a style="line-height: 25px;padding: 0px;color: #fff">{$rz_count}</a>

Loading…
Cancel
Save