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

master
zyx 5 years ago
commit 0ffbc8aff9

@ -44,7 +44,7 @@ class RechargeSumController extends ThinkController{
$map['pay_way'] = array('egt',0);
}
if(!empty($_REQUEST['promote_id'])){
if(isset($_REQUEST['promote_id'])){
// switch ($_REQUEST['promote_id']) {
// case 'GUANFANG':
// $map['promote_id'] = 0;
@ -59,8 +59,12 @@ class RechargeSumController extends ThinkController{
// $rmap['promote_id'] = $_REQUEST['promote_id'];
// break;
// }
if ($_REQUEST['promote_id'] > 0) {
$promoter_ids = D("Promote")->where("parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}")->field('id')->select();
$promoter_ids ? $rmap['promote_id'] = $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null;
} else {
$rmap['promote_id'] = $map['promote_id'] = 0;
}
}
//当天注册人数
@ -88,6 +92,9 @@ class RechargeSumController extends ThinkController{
case 'GUANFANG':
$data[$key]['promote_id'] = "官方渠道";
break;
case 0:
$data[$key]['promote_id'] = "官方渠道";
break;
case 'PROMOTE':
$data[$key]['promote_id'] = "推广渠道";
break;

@ -71,7 +71,11 @@ class SpendController extends ThinkController {
unset($_REQUEST['pay_game_status']);
}
if(isset($_REQUEST['promote_id'])) {
if ($_REQUEST['promote_id'] == 0) {
$map['promote_id'] = 0;
} else {
$map['_complex'] = ['tp.parent_id'=>$_REQUEST['promote_id'], 'tp.grand_id'=>$_REQUEST['promote_id'], 'tp.id'=>$_REQUEST['promote_id'], '_logic' => 'or'];
}
$tab_promote_join = "left join tab_promote as tp on tp.id = tab_spend.promote_id";
//unset($_REQUEST['promote_id']);
} else {

@ -570,8 +570,14 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
unset($_REQUEST['role_name']);
}
if (isset($_REQUEST['promote_id'])) {
$promoter_ids = D("Promote")->where("parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}")->field('id')->select();
$queryStr = '';
if ($_REQUEST['promote_id'] == 0) {
$map['promote_id'] = '0';
} else {
$queryStr = "parent_id={$_REQUEST['promote_id']} or grand_id={$_REQUEST['promote_id']} or id={$_REQUEST['promote_id']}";
$promoter_ids = D("Promote")->where($queryStr)->field('id')->select();
$promoter_ids ? $map['promote_id'] = ['in', implode(',', array_column($promoter_ids, 'id'))] : null;
}
}
empty(I('user_account')) || $map['user_account'] = ['like',"%".I('user_account')."%"];

@ -406,7 +406,7 @@ $(function(){
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">请选择推广员</option><option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option><option value="UC" '+(promote_id && 'UC' == promote_id?'selected':'')+'>UC用户</option>';
str = '<option value="">请选择推广员</option><option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';

@ -292,7 +292,7 @@ $(function(){
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = "<option value=''>请选择推广员</option>";
str = '<option value="">请选择推广员</option><option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';

@ -487,7 +487,7 @@
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = "<option value=''>请选择推广员</option>";
str = '<option value="">请选择推广员</option><option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';

@ -102,6 +102,7 @@
<th class="">角色ID</th>
<th class="">角色名</th>
<th class="">游戏等级</th>
<th class="">所属推广员</th>
<th class="">最后登录时间</th>
<th class="">最后登录IP</th>
<!-- <th class="">操作</th> -->
@ -122,6 +123,7 @@
<td><span class="badge">{$data['role_id']}</span></td>
<td><notempty name="rolename">{$rolename}<else /></notempty></td>
<td>{$data.role_level}</td>
<td>{$data.promote_account}</td>
<td><?= date('Y-m-d H:i:s', $data['play_time']) ?></td>
<td>{$data.play_ip}</td>
<!-- <td><a class="ajax-get" href="{:U('user_update',['ids'=>$data['id']])}">更新</a></td> -->
@ -246,7 +248,7 @@ $(".select_gallery").select2();
data:{level:$("#promote_level option:selected").val()},
dataType:'json',
success:function(response){
str = '<option value="">请选择推广员</option>';
str = '<option value="">请选择推广员</option><option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';

@ -1154,34 +1154,37 @@ class QueryController extends BaseController
->select());//创角用户
$newUserNumData = $userPlayInfoModel
->field('tab_user_play_info.create_time,count(distinct tab_user_play_info.user_id) as num')
->field('tab_user_play_info.create_time')
->join($join)
->where($userPlayInfoWhere2)
->where($map)
->having('tab_user_play_info.create_time between ' . $begTime . ' and ' . ($endTime + 86399))
->group('tab_user_play_info.user_id')
->having('tab_user_play_info.create_time between ' . $thisDateTime . ' and ' . ($thisDateTime + 86399))
->order('tab_user_play_info.id')
->find();
$list['new_user_num'] = empty($newUserNumData['num']) ? 0 : $newUserNumData['num'];//新创角用户
->select();
$list['new_user_num'] = count($newUserNumData);//新创角用户
$newDeviceData = $userPlayInfoModel
->field('tab_user_play_info.create_time,count(distinct tab_user_play_info.create_device_number) as num')
->field('tab_user_play_info.create_time')
->join($join)
->where($userPlayInfoWhere2)
->where($map)
->having('tab_user_play_info.create_time between ' . $begTime . ' and ' . ($endTime + 86399))
->group('tab_user_play_info.create_device_number')
->having('tab_user_play_info.create_time between ' . $thisDateTime . ' and ' . ($thisDateTime + 86399))
->order('tab_user_play_info.id')
->find();
$list['new_device_num'] = empty($newDeviceData['num']) ? 0 : $newDeviceData['num'];//新创角设备
->select();
$list['new_device_num'] = count($newDeviceData);//新创角设备
$newIpNumData = $userPlayInfoModel
->field('tab_user_play_info.create_time,count(distinct tab_user_play_info.create_ip) as num')
->field('tab_user_play_info.create_time')
->join($join)
->where($userPlayInfoWhere2)
->where($map)
->having('tab_user_play_info.create_time between ' . $begTime . ' and ' . ($endTime + 86399))
->group('tab_user_play_info.create_ip')
->having('tab_user_play_info.create_time between ' . $thisDateTime . ' and ' . ($thisDateTime + 86399))
->order('tab_user_play_info.id')
->find();
$list['new_ip_num'] = empty($newIpNumData['num']) ? 0 : $newIpNumData['num'];//新增创角IP
->select();
$list['new_ip_num'] = count($newIpNumData);//新增创角IP
$list['login_user_num'] = count(M('UserGameLoginRecord', 'tab_')
->join($join)
@ -1451,28 +1454,31 @@ class QueryController extends BaseController
->count('distinct tab_user_play_info.user_id');//创角用户
$newUserNumData = $userPlayInfoModel
->field('tab_user_play_info.create_time,count(distinct tab_user_play_info.user_id) as num')
->field('tab_user_play_info.create_time')
->where($userPlayInfoMap2)
->group('tab_user_play_info.user_id')
->having('tab_user_play_info.create_time between ' . $begTime . ' and ' . ($endTime + 86399))
->order('tab_user_play_info.id')
->find();
$list['new_user_num'] = empty($newUserNumData['num']) ? 0 : $newUserNumData['num'];//新创角用户
->select();
$list['new_user_num'] = count($newUserNumData);//新创角用户
$newDeviceData = $userPlayInfoModel
->field('tab_user_play_info.create_time,count(distinct tab_user_play_info.create_device_number) as num')
->field('tab_user_play_info.create_time')
->where($userPlayInfoMap2)
->group('tab_user_play_info.create_device_number')
->having('tab_user_play_info.create_time between ' . $begTime . ' and ' . ($endTime + 86399))
->order('tab_user_play_info.id')
->find();
$list['new_device_num'] = empty($newDeviceData['num']) ? 0 : $newDeviceData['num'];//新创角设备
->select();
$list['new_device_num'] = count($newDeviceData);//新创角设备
$newIpData = $userPlayInfoModel
->field('tab_user_play_info.create_time,count(distinct tab_user_play_info.create_ip) as num')
->field('tab_user_play_info.create_time')
->where($userPlayInfoMap2)
->group('tab_user_play_info.create_ip')
->having('tab_user_play_info.create_time between ' . $begTime . ' and ' . ($endTime + 86399))
->order('tab_user_play_info.id')
->find();
$list['new_ip_num'] = empty($newIpData['num']) ? 0 : $newIpData['num'];//新增创角IP
->select();
$list['new_ip_num'] = count($newIpData);//新增创角IP
$list['login_user_num'] = $userGameLoginModel
->where($userGameLoginMap)

@ -94,7 +94,7 @@
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</notempty>
<if condition="$_GET['team_leader_id'] gt 0">
<if condition="($_GET['team_leader_id'] gt 0 or $thisParentPromoteId gt 0) or ($_GET['team_leader_id'] eq 0 and $thisParentPromoteId gt 0)">
<volist name=":getAllPromoteListByType(3,false,empty(I('team_leader_id'))?PID:I('team_leader_id'))" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>

@ -85,7 +85,7 @@
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</notempty>
<if condition="$_GET['team_leader_id'] gt 0">
<if condition="($_GET['team_leader_id'] gt 0 or $thisParentPromoteId gt 0) or ($_GET['team_leader_id'] eq 0 and $thisParentPromoteId gt 0)">
<volist name=":getAllPromoteListByType(3,false,empty(I('team_leader_id'))?PID:I('team_leader_id'))" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>

@ -56,7 +56,7 @@
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</notempty>
<if condition="$_GET['team_leader_id'] gt 0">
<if condition="($_GET['team_leader_id'] gt 0 or $thisParentPromoteId gt 0) or ($_GET['team_leader_id'] eq 0 and $thisParentPromoteId gt 0)">
<volist name=":getAllPromoteListByType(3,false,empty(I('team_leader_id'))?PID:I('team_leader_id'))" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>

@ -84,7 +84,7 @@
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</notempty>
<if condition="$_GET['team_leader_id'] gt 0">
<if condition="($_GET['team_leader_id'] gt 0 or $thisParentPromoteId gt 0) or ($_GET['team_leader_id'] eq 0 and $thisParentPromoteId gt 0)">
<volist name=":getAllPromoteListByType(3,false,empty(I('team_leader_id'))?PID:I('team_leader_id'))" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>

Loading…
Cancel
Save