|
|
@ -73,6 +73,7 @@ class FinancePromoteController extends AdminController
|
|
|
|
if(!array_key_exists('balance_coin_count',$v)) $v['balance_coin_count']=0;
|
|
|
|
if(!array_key_exists('balance_coin_count',$v)) $v['balance_coin_count']=0;
|
|
|
|
if(!array_key_exists('bind_coin_count',$v)) $v['bind_coin_count']=0;
|
|
|
|
if(!array_key_exists('bind_coin_count',$v)) $v['bind_coin_count']=0;
|
|
|
|
if(!array_key_exists('inside_cash_count',$v)) $v['inside_cash_count']=0;
|
|
|
|
if(!array_key_exists('inside_cash_count',$v)) $v['inside_cash_count']=0;
|
|
|
|
|
|
|
|
$v['promote_account'] = get_promote_name($v['p_id']);
|
|
|
|
$v['allcount'] = $v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'];
|
|
|
|
$v['allcount'] = $v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'];
|
|
|
|
$count['cash_count'] += $v['cash_count'];
|
|
|
|
$count['cash_count'] += $v['cash_count'];
|
|
|
|
$count['balance_coin_count'] += $v['balance_coin_count'];
|
|
|
|
$count['balance_coin_count'] += $v['balance_coin_count'];
|
|
|
@ -82,6 +83,17 @@ class FinancePromoteController extends AdminController
|
|
|
|
$data[] = $v;
|
|
|
|
$data[] = $v;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$data = my_sort($data, $data_order_type, (int)$data_order);
|
|
|
|
$data = my_sort($data, $data_order_type, (int)$data_order);
|
|
|
|
|
|
|
|
if(isset($_REQUEST['export'])){
|
|
|
|
|
|
|
|
data2csv($data,'公会统计',array(
|
|
|
|
|
|
|
|
"company_name"=>"推广公司",
|
|
|
|
|
|
|
|
"promote_account"=>"会长渠道",
|
|
|
|
|
|
|
|
"cash_count"=>"游戏现金金额",
|
|
|
|
|
|
|
|
"balance_coin_count"=>"平台币直充支出",
|
|
|
|
|
|
|
|
"bind_coin_count"=>"内充支出",
|
|
|
|
|
|
|
|
"inside_cash_count"=>"平台币内充",
|
|
|
|
|
|
|
|
"allcount"=>"渠道游戏内充值合计"
|
|
|
|
|
|
|
|
));die();
|
|
|
|
|
|
|
|
}
|
|
|
|
$this->assign('list_data', $data);
|
|
|
|
$this->assign('list_data', $data);
|
|
|
|
$this->assign('all_count', $count);
|
|
|
|
$this->assign('all_count', $count);
|
|
|
|
$this->meta_title = '公会统计';
|
|
|
|
$this->meta_title = '公会统计';
|
|
|
@ -254,7 +266,7 @@ class FinancePromoteController extends AdminController
|
|
|
|
$field= "SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
|
|
|
|
$field= "SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
|
|
|
|
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
|
|
|
|
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
|
|
|
|
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as bind_coin_count,
|
|
|
|
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as bind_coin_count,
|
|
|
|
IFNULL(company_id,0) company_id,company_name,promote_id";
|
|
|
|
IFNULL(company_id,0) company_id,company_name,promote_id,promote.account promote_account";
|
|
|
|
return M()
|
|
|
|
return M()
|
|
|
|
->table("tab_spend s")
|
|
|
|
->table("tab_spend s")
|
|
|
|
->field($field)
|
|
|
|
->field($field)
|
|
|
|