|
|
|
@ -432,7 +432,7 @@ class PlatformController extends ThinkController
|
|
|
|
|
unset($_REQUEST['game_name']);
|
|
|
|
|
}
|
|
|
|
|
if (isset($_REQUEST['server_id'])) {
|
|
|
|
|
$play_info_map .= " and upi.server_name = '{$_REQUEST['server_id']}' ";
|
|
|
|
|
$play_info_map .= " and upi.server_id = '{$_REQUEST['server_id']}' ";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$today = total(1);
|
|
|
|
@ -489,6 +489,7 @@ class PlatformController extends ThinkController
|
|
|
|
|
->group('tp1.id')
|
|
|
|
|
->order('register_time')
|
|
|
|
|
->select();
|
|
|
|
|
// dd($tdata);die();
|
|
|
|
|
|
|
|
|
|
$tmdata = [];
|
|
|
|
|
foreach($data as $k=>$v){
|
|
|
|
@ -497,19 +498,18 @@ class PlatformController extends ThinkController
|
|
|
|
|
$v['mounth'] = 0;
|
|
|
|
|
$tmdata[$v['id']] = $v;
|
|
|
|
|
}
|
|
|
|
|
foreach ($tdata as $k => $v) {
|
|
|
|
|
|
|
|
|
|
$tmdata[$v['id']]['today'] = $v['today'];
|
|
|
|
|
$tmdata[$v['id']]['week'] = $v['week'];
|
|
|
|
|
$tmdata[$v['id']]['mounth'] = $v['mounth'];
|
|
|
|
|
|
|
|
|
|
if (!$tmdata[$v['id']]['promote_account']) {
|
|
|
|
|
$tmdata[$v['id']]['promote_account'] = $v['promote_account'];
|
|
|
|
|
$tmdata[$v['id']]['count'] = 0;
|
|
|
|
|
if(!empty($tdata)){
|
|
|
|
|
foreach ($tdata as $k => $v) {
|
|
|
|
|
$tmdata[$v['id']]['today'] = $v['today'];
|
|
|
|
|
$tmdata[$v['id']]['week'] = $v['week'];
|
|
|
|
|
$tmdata[$v['id']]['mounth'] = $v['mounth'];
|
|
|
|
|
if (!$tmdata[$v['id']]['promote_account']) {
|
|
|
|
|
$tmdata[$v['id']]['promote_account'] = $v['promote_account'];
|
|
|
|
|
$tmdata[$v['id']]['count'] = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$data = [];
|
|
|
|
|
foreach($tmdata as $k => $v){
|
|
|
|
|
$data[] = $v;
|
|
|
|
@ -519,7 +519,8 @@ class PlatformController extends ThinkController
|
|
|
|
|
unset($map['tp1.chain']);
|
|
|
|
|
unset($tmap['tp1.chain']);
|
|
|
|
|
unset($tmap['tp1.chain']);
|
|
|
|
|
$map['promote_id'] = 0;
|
|
|
|
|
$map['u.promote_id'] = 0;
|
|
|
|
|
$tmap['u.promote_id'] = 0;
|
|
|
|
|
$authorityData['count'] = 0;
|
|
|
|
|
|
|
|
|
|
//如果有官方渠道权限
|
|
|
|
@ -527,7 +528,8 @@ class PlatformController extends ThinkController
|
|
|
|
|
if ($user_auth_promote_ids == 'all' || in_array('0', explode(",", $user_auth_promote_ids))) {
|
|
|
|
|
//官方渠道数据添加
|
|
|
|
|
$authorityData = M('user', 'tab_')->alias('u')
|
|
|
|
|
->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time,count(id) as count')
|
|
|
|
|
->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time,count(u.id) as count')
|
|
|
|
|
->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false)
|
|
|
|
|
->where($map)
|
|
|
|
|
->find();
|
|
|
|
|
$tauthorityData = M('user', 'tab_')->alias('u')
|
|
|
|
@ -536,6 +538,7 @@ class PlatformController extends ThinkController
|
|
|
|
|
count(IF(register_time ' . $week . ',1,null)) as week,
|
|
|
|
|
count(IF(register_time ' . $mounth . ',1,null)) as mounth')
|
|
|
|
|
->where($tmap)
|
|
|
|
|
->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false)
|
|
|
|
|
->find();
|
|
|
|
|
$authorityData['today'] = $tauthorityData['today'];
|
|
|
|
|
$authorityData['week'] = $tauthorityData['week'];
|
|
|
|
|