if (isset($_REQUEST['server_id'])||isset($_REQUEST['game_name'])||isset($_REQUEST['promote_id'])||isset($_REQUEST['admin_id'])||isset($_REQUEST['admin_user_id'])) {
$data = M('promote', 'tab_')->alias('tp1')
->field('tp1.account as promote_account,tp1.id,
floor(sum(pay_amount)*100) as count')
@ -687,16 +686,28 @@ class PlatformController extends ThinkController
->field("promote_account,promote_id as id,sum(count) count")
->join('tab_promote on tab_promote.id = tab_promote_statistics.promote_id', 'left')
->where($statisticsMap)
->group("promote_id")
->select();
}
// if (isset($_REQUEST['server_id'])||isset($_REQUEST['game_name'])||isset($_REQUEST['promote_id'])||isset($_REQUEST['admin_id'])||isset($_REQUEST['admin_user_id'])) {
// $data = M('promote', 'tab_')->alias('tp1')
// ->field('tp1.account as promote_account,tp1.id,
// floor(sum(pay_amount)*100) as count')
// ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left')
// ->join("tab_spend as s use INDEX(search) on tp2.id = s.promote_id", 'left')
// ->join("tab_game as g on g.id = s.game_id", 'left')