平台统计游戏注册导出修改

master
zhengyongxing 5 years ago
parent 0644f66520
commit 9198c17d5f

@ -1645,11 +1645,18 @@ class ExportController extends Controller
$arraypage=$page;
$row = 10;
$user=M('User','tab_');
$map['fgame_id']=array('gt',0);$map['puid'] = 0;
$map['fgame_id']=array('egt',0);$map['puid'] = 0;
if(isset($_REQUEST['timestart'])&&isset($_REQUEST['timeend'])){
$map['register_time'] =array('BETWEEN',array(strtotime($_REQUEST['timestart']),strtotime($_REQUEST['timeend'])+24*60*60-1));
unset($_REQUEST['timestart']);unset($_REQUEST['timeend']);
} elseif (!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) {
$map['register_time'] = ['between', array(strtotime($_REQUEST['timestart']), time())];
unset($_REQUEST['timestart']);
} elseif (empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])) {
$map['register_time'] = ['elt', strtotime($_REQUEST['timeend']) + 86399];
unset($_REQUEST['timeend']);
}
if(isset($_REQUEST['start'])&&isset($_REQUEST['end'])){
$map['register_time'] =array('BETWEEN',array(strtotime($_REQUEST['start']),strtotime($_REQUEST['end'])+24*60*60-1));
unset($_REQUEST['start']);unset($_REQUEST['end']);
@ -1668,13 +1675,18 @@ class ExportController extends Controller
count(IF(register_time '.$mounth.',1,null)) as mounth')
->where($map)
->group('fgame_id')
->order('count desc')
->order('count desc,register_time')
->select();
$count=count($data);
foreach ($data as $key => $value) {
static $i=0;
$i++;
$data[$key]['rand']=$i;
if ($data[$key]['fgame_id'] == 0) {
$data[$key]['fgame_name'] = '其他注册';
}
}
$total=A('Platform')->data_total($data);
if($_REQUEST['data_order']!=''){

Loading…
Cancel
Save