|
|
@ -33,7 +33,7 @@ class MarketPercentageController extends ThinkController
|
|
|
|
// $_REQUEST['pay_time']?($map['pay_time'] = $_REQUEST['pay_time']):'';
|
|
|
|
// $_REQUEST['pay_time']?($map['pay_time'] = $_REQUEST['pay_time']):'';
|
|
|
|
$_REQUEST['promote_id']?($map['promote_id'] = $_REQUEST['promote_id']):'';
|
|
|
|
$_REQUEST['promote_id']?($map['promote_id'] = $_REQUEST['promote_id']):'';
|
|
|
|
$_REQUEST['relation_game_id']?($map['relation_game_id'] = $_REQUEST['relation_game_id']):'';
|
|
|
|
$_REQUEST['relation_game_id']?($map['relation_game_id'] = $_REQUEST['relation_game_id']):'';
|
|
|
|
$_REQUEST['sdk_version']?($map['sdk_version'] = $_REQUEST['sdk_version']):'';
|
|
|
|
// $_REQUEST['sdk_version']?($map['sdk_version'] = $_REQUEST['sdk_version']):'';
|
|
|
|
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
|
|
|
|
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
|
|
|
|
($_REQUEST['company_id']||$_REQUEST['company_id']=='0')?($map['company_id'] = $_REQUEST['company_id']):'';
|
|
|
|
($_REQUEST['company_id']||$_REQUEST['company_id']=='0')?($map['company_id'] = $_REQUEST['company_id']):'';
|
|
|
|
|
|
|
|
|
|
|
@ -103,11 +103,10 @@ class MarketPercentageController extends ThinkController
|
|
|
|
// dump($map);die();
|
|
|
|
// dump($map);die();
|
|
|
|
// var_dump($map);die();
|
|
|
|
// var_dump($map);die();
|
|
|
|
|
|
|
|
|
|
|
|
$data = M("settleup_marketorder","tab_")
|
|
|
|
$data = SM("settleup_marketorder","tab_")
|
|
|
|
->field("pay_time,promote_account,company_name,company_belong,member.real_name,develop_type,game_name,
|
|
|
|
->field("pay_time,promote_account,company_name,company_belong,real_name,develop_type,game_name,
|
|
|
|
sum(pay_amount) pay_amount,sum(cp_amount) cp_amount,sum(promote_amount) promote_amount,
|
|
|
|
sum(pay_amount) pay_amount,sum(cp_amount) cp_amount,sum(promote_amount) promote_amount,
|
|
|
|
sum(channel_amount) channel_amount, sum(company_tax) company_tax,sum(company_profit) company_profit")
|
|
|
|
sum(channel_amount) channel_amount, sum(company_tax) company_tax,sum(company_profit) company_profit");
|
|
|
|
->join("left join sys_member member on member.uid=admin_id");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['export']) {
|
|
|
|
if ($_REQUEST['export']) {
|
|
|
|
$data = $data->where($map)
|
|
|
|
$data = $data->where($map)
|
|
|
@ -122,7 +121,7 @@ class MarketPercentageController extends ThinkController
|
|
|
|
->select();
|
|
|
|
->select();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$sum = M("settleup_marketorder","tab_")
|
|
|
|
$sum = SM("settleup_marketorder","tab_")
|
|
|
|
->field("pay_time,promote_account,company_belong,real_name,develop_type,game_name,
|
|
|
|
->field("pay_time,promote_account,company_belong,real_name,develop_type,game_name,
|
|
|
|
sum(pay_amount) pay_amount,sum(cp_amount) cp_amount,sum(promote_amount) promote_amount,
|
|
|
|
sum(pay_amount) pay_amount,sum(cp_amount) cp_amount,sum(promote_amount) promote_amount,
|
|
|
|
sum(channel_amount) channel_amount, sum(company_tax) company_tax,sum(company_profit) company_profit")
|
|
|
|
sum(channel_amount) channel_amount, sum(company_tax) company_tax,sum(company_profit) company_profit")
|
|
|
@ -186,12 +185,13 @@ class MarketPercentageController extends ThinkController
|
|
|
|
data2csv($data,'市场毛利统计',$title);
|
|
|
|
data2csv($data,'市场毛利统计',$title);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$count = M("settleup_marketorder","tab_")
|
|
|
|
$count = SM("settleup_marketorder","tab_")
|
|
|
|
|
|
|
|
->field("promote_id,game_name,pay_time,admin_id")
|
|
|
|
->where($map)
|
|
|
|
->where($map)
|
|
|
|
->group("promote_id,game_name,pay_time,admin_id")
|
|
|
|
->group("promote_id,game_name,pay_time,admin_id")
|
|
|
|
->select(false);
|
|
|
|
->select();
|
|
|
|
|
|
|
|
$count = count($count);
|
|
|
|
$count = M()->table("({$count}) count")->count();
|
|
|
|
// $count = M()->table("({$count}) count")->count();
|
|
|
|
|
|
|
|
|
|
|
|
$page = set_pagination($count, $row);
|
|
|
|
$page = set_pagination($count, $row);
|
|
|
|
if ($page) {
|
|
|
|
if ($page) {
|
|
|
|