|
|
|
@ -38,7 +38,7 @@ class ExportController extends Controller
|
|
|
|
|
//导出Excel
|
|
|
|
|
function expUser($id)
|
|
|
|
|
{
|
|
|
|
|
$xlsName = $_REQUEST['xlsname'];
|
|
|
|
|
$xlsName = $_REQUEST['xlsname'];
|
|
|
|
|
switch ($id) {
|
|
|
|
|
case 1:
|
|
|
|
|
|
|
|
|
@ -52,7 +52,7 @@ class ExportController extends Controller
|
|
|
|
|
array('play_ip', "最后登录ip"),
|
|
|
|
|
);
|
|
|
|
|
if (isset($_REQUEST['game_name'])) {
|
|
|
|
|
$map['game_name'] = trim($_REQUEST['game_name']);
|
|
|
|
|
$map['game_name'] = ['like', trim($_REQUEST['game_name'])."%"];
|
|
|
|
|
unset($_REQUEST['game_name']);
|
|
|
|
|
}
|
|
|
|
|
if (isset($_REQUEST['user_account'])) {
|
|
|
|
@ -599,14 +599,18 @@ class ExportController extends Controller
|
|
|
|
|
unset($_REQUEST['start']);
|
|
|
|
|
unset($_REQUEST['end']);
|
|
|
|
|
}
|
|
|
|
|
if (isset($_REQUEST['game_name'])) {
|
|
|
|
|
if ($_REQUEST['game_name'] == L('All')) {
|
|
|
|
|
if(isset($_REQUEST['game_name'])){
|
|
|
|
|
if($_REQUEST['game_name']=='全部'){
|
|
|
|
|
unset($_REQUEST['game_name']);
|
|
|
|
|
} else {
|
|
|
|
|
$map['game_name'] = $_REQUEST['game_name'];
|
|
|
|
|
}else{
|
|
|
|
|
$map['tab_spend.game_id']= ['in', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')];
|
|
|
|
|
unset($_REQUEST['game_name']);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(isset($_REQUEST['server_name'])){
|
|
|
|
|
$map['tab_spend.server_name']=$_REQUEST['server_name'];
|
|
|
|
|
unset($_REQUEST['server_name']);
|
|
|
|
|
}
|
|
|
|
|
if (isset($_REQUEST['pay_order_number'])) {
|
|
|
|
|
$map['pay_order_number'] = array('like', '%' . trim($_REQUEST['pay_order_number']) . '%');
|
|
|
|
|
unset($_REQUEST['pay_order_number']);
|
|
|
|
@ -623,6 +627,17 @@ class ExportController extends Controller
|
|
|
|
|
$map['pay_game_status'] = $_REQUEST['pay_game_status'];
|
|
|
|
|
unset($_REQUEST['pay_game_status']);
|
|
|
|
|
}
|
|
|
|
|
if(isset($_REQUEST['promote_id'])) {
|
|
|
|
|
if ($_REQUEST['promote_id'] == 0) {
|
|
|
|
|
$map['promote_id'] = 0;
|
|
|
|
|
} else {
|
|
|
|
|
$map['_complex'] = ['tp.chain'=>['like', "%/{$_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 {
|
|
|
|
|
$tab_promote_join = false;
|
|
|
|
|
}
|
|
|
|
|
$map1 = $map;
|
|
|
|
|
$map1['pay_status'] = 1;
|
|
|
|
|
$total = D('Spend')->where($map1)->sum('pay_amount');
|
|
|
|
@ -634,6 +649,7 @@ class ExportController extends Controller
|
|
|
|
|
$xlsData = D('Spend')
|
|
|
|
|
->field('pay_order_number,pay_time,user_account,game_name,promote_account,spend_ip,pay_amount,pay_amount,pay_status,pay_game_status,pay_way,server_name,game_player_name,cost')
|
|
|
|
|
->where($map)
|
|
|
|
|
->join($tab_promote_join)
|
|
|
|
|
->order('pay_time DESC')
|
|
|
|
|
->select();
|
|
|
|
|
$xlsCell = array(
|
|
|
|
@ -3801,7 +3817,7 @@ if ($key == 'model'){
|
|
|
|
|
$model = M('game','tab_');
|
|
|
|
|
|
|
|
|
|
if(isset($_REQUEST['game_name'])){
|
|
|
|
|
$map['game_name'] = $_REQUEST['game_name'];
|
|
|
|
|
$extend['game_name'] = ['like', "{$_REQUEST['game_name']}%"];
|
|
|
|
|
}
|
|
|
|
|
if(isset($_REQUEST['sdk_version1'])){
|
|
|
|
|
$map['sdk_version']=$_REQUEST['sdk_version1'];
|
|
|
|
@ -4185,8 +4201,10 @@ if ($key == 'model'){
|
|
|
|
|
|
|
|
|
|
if(isset($_REQUEST['game_name'])){
|
|
|
|
|
if($_REQUEST['game_name']=='全部'){
|
|
|
|
|
unset($_REQUEST['game_name']);
|
|
|
|
|
}else{
|
|
|
|
|
$map['game_name']=$_REQUEST['game_name'];
|
|
|
|
|
$extend['game_name']=['like', "{$_REQUEST['game_name']}%"];
|
|
|
|
|
unset($_REQUEST['game_name']);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -5393,8 +5411,9 @@ if ($key == 'model'){
|
|
|
|
|
$map['promote_account'] = array('like','%'.I("root_name").'%');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!empty(I("game_id"))) {
|
|
|
|
|
$map['game_id'] = I("game_id");
|
|
|
|
|
$game_ids = array_column(getGameByName(I("game_name"), I("sdk_type")), 'id');
|
|
|
|
|
if ($game_ids) {
|
|
|
|
|
$map['game_id'] = ['in', $game_ids];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!empty(I('partner_id'))) {
|
|
|
|
|