|
|
|
@ -1864,6 +1864,109 @@ class ExportController extends Controller
|
|
|
|
|
}
|
|
|
|
|
$xlsData = $data;
|
|
|
|
|
break;
|
|
|
|
|
case 22:
|
|
|
|
|
$xlsCell = array(
|
|
|
|
|
array('game_name', '游戏'),
|
|
|
|
|
array('authorization_num', '已授权游戏数量'),
|
|
|
|
|
array('pay_game_supersign', '超级签被购买数量'),
|
|
|
|
|
array('promote_super_money', '推广超级签金额'),
|
|
|
|
|
array('official_super_money', '官方超级签金额'),
|
|
|
|
|
);
|
|
|
|
|
$map['supersign_token'] = ['NEQ',''];
|
|
|
|
|
$supersign_game = M('game', 'tab_')->field('id,game_name,supersign_token')->where($map)->select();
|
|
|
|
|
$xlsData = [];
|
|
|
|
|
$count['authorization'] = 0;
|
|
|
|
|
$count['pay_num'] = 0;
|
|
|
|
|
$count['promote_super_money'] = 0;
|
|
|
|
|
$count['official_super_money'] = 0;
|
|
|
|
|
foreach($supersign_game as $k => $v) {
|
|
|
|
|
$arr['game_name'] = $v['game_name'];
|
|
|
|
|
$re_data = [];
|
|
|
|
|
$curl['token'] = $v['token'];
|
|
|
|
|
$curl['limit'] = 2000;
|
|
|
|
|
for ($i = 1;$i > 0;$i++) {
|
|
|
|
|
if($i != 1) {
|
|
|
|
|
$pop = array_pop($data);
|
|
|
|
|
$curl['lastid'] = $pop['id'];
|
|
|
|
|
}
|
|
|
|
|
$curl_re = json_decode(curl_post('https://app.ipa365.com/Kirin/OpenApi/TicketList',$curl),true);
|
|
|
|
|
if($curl_re['errno'] == 0) {
|
|
|
|
|
$data = $curl_re['data']['list'];
|
|
|
|
|
$re_data = array_merge($re_data,$data);
|
|
|
|
|
} else {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if(count($data) != $curl['limit']) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$arr['authorization_num'] = count($re_data);
|
|
|
|
|
$game_supersign = M('game_supersign', 'tab_')->field('promote_id')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->where(['game_id' => $v['id'], 'pay_status' => 1])->select();
|
|
|
|
|
$arr['pay_game_supersign'] = count($game_supersign);
|
|
|
|
|
$arr['promote_super_money'] = 0;
|
|
|
|
|
$arr['official_super_money'] = 0;
|
|
|
|
|
foreach($game_supersign as $key => $val) {
|
|
|
|
|
if($val['promote_id'] != 0) {
|
|
|
|
|
$arr['promote_super_money'] += 10;
|
|
|
|
|
}else {
|
|
|
|
|
$arr['official_super_money'] += 10;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$xlsData[] = $arr;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 23:
|
|
|
|
|
$xlsCell = array(
|
|
|
|
|
array('order_id', '订单号'),
|
|
|
|
|
array('account', '游戏账号'),
|
|
|
|
|
array('promote_account', '所属推广员'),
|
|
|
|
|
array('device_number', '设备号'),
|
|
|
|
|
array('game_name', '游戏'),
|
|
|
|
|
array('pay_time', '购买时间'),
|
|
|
|
|
array('super_money', '超级签金额'),
|
|
|
|
|
);
|
|
|
|
|
$xlsData = M('game_supersign', 'tab_')->field('tab_game_supersign.id,tab_game_supersign.order_id,tab_user.account,tab_user.promote_account,tab_user.device_number,tab_game.game_name,tab_game_supersign.pay_time')->join('tab_user on tab_game_supersign.user_id = tab_user.id')->join('tab_game on tab_game_supersign.game_id = tab_game.id')->where(['tab_game_supersign.pay_status' => 1])->order('id DESC')->select();
|
|
|
|
|
foreach($xlsData as $k => $v) {
|
|
|
|
|
$xlsData[$k]['pay_time'] = date('Y-m-d H:i:s',$v['pay_time']);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 24:
|
|
|
|
|
$xlsCell = array(
|
|
|
|
|
array('authorization_all_num', '已授权游戏总数'),
|
|
|
|
|
array('buy_num', '超级签被购买数量'),
|
|
|
|
|
array('money_all', '超级签金额合计'),
|
|
|
|
|
);
|
|
|
|
|
$map['supersign_token'] = ['NEQ',''];
|
|
|
|
|
$supersign_game = M('game', 'tab_')->field('supersign_token')->where($map)->select();
|
|
|
|
|
$supersign_token = array_column($supersign_game, 'supersign_token');
|
|
|
|
|
$authorization_all_num = 0;
|
|
|
|
|
foreach($supersign_token as $k => $v) {
|
|
|
|
|
$re_data = [];
|
|
|
|
|
$curl['token'] = $v;
|
|
|
|
|
$curl['limit'] = 2000;
|
|
|
|
|
for ($i = 1;$i > 0;$i++) {
|
|
|
|
|
if($i != 1) {
|
|
|
|
|
$pop = array_pop($data);
|
|
|
|
|
$curl['lastid'] = $pop['id'];
|
|
|
|
|
}
|
|
|
|
|
$curl_re = json_decode(curl_post('https://app.ipa365.com/Kirin/OpenApi/TicketList',$curl),true);
|
|
|
|
|
if($curl_re['errno'] == 0) {
|
|
|
|
|
$data = $curl_re['data']['list'];
|
|
|
|
|
$re_data = array_merge($re_data,$data);
|
|
|
|
|
} else {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if(count($data) != $curl['limit']) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$authorization_all_num += count($re_data);
|
|
|
|
|
}
|
|
|
|
|
$where['pay_status'] = 1;
|
|
|
|
|
$xlsData[0]['buy_num'] = M('game_supersign', 'tab_')->where($where)->count();
|
|
|
|
|
$xlsData[0]['money_all'] = $xlsData[0]['buy_num'] * 10;
|
|
|
|
|
$xlsData[0]['authorization_all_num'] = $authorization_all_num;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
$xlsName = $xlsCell = $xlsData = [];
|
|
|
|
|