->join("inner join tab_deposit on tab_pay_info.order_id=tab_deposit.pay_order_number")
->field('sum(pay_amount) as pay_amount,tab_deposit.pay_way as pay_way')
->where($map)
->group('tab_deposit.pay_way')
->select(false);
// var_dump($depositData);die();
}
$bindMap['pay_status'] = 1;
$bindMap['pay_way'] = array('egt',1);
@ -390,8 +424,14 @@ class PayChannelController extends ThinkController
->where($bindMap)
->select(false);
if(!$_REQUEST['game_id']) {
$sql = "{$channelData} UNION ALL {$depositData} UNION ALL {$superSignDataPay} UNION ALL {$spreadDataPay} UNION ALL {$bindRechargeData}";
} else {
$sql = "{$channelData} UNION ALL {$depositData}";
}
//将语句整合起来查询
$channelData = "select sum(pay_amount) as pay_amount,pay_way from ({$channelData} UNION ALL {$depositData} UNION ALL {$superSignDataPay} UNION ALL {$spreadDataPay} UNION ALL {$bindRechargeData})t group by pay_way;";
$channelData = "select sum(pay_amount) as pay_amount,pay_way from ({$sql})t group by pay_way;";
// var_dump($channelData);die();
$channelData = M()->query($channelData);
@ -482,7 +522,7 @@ class PayChannelController extends ThinkController
// setPowerPromoteIds($spreadMap,'promote_id');
// $spreadMap['pay_way'] = array('egt',1);
$coin_pay_order = M('coin_pay_order','tab_')
->field("pay_order_number,create_time as pay_time,promote_account,pay_amount as cost,real_amount as pay_amount,pay_way")
->field("pay_order_number,create_time as pay_time,promote_account,pay_amount,real_amount as cost,pay_way")