From df2da6098692ee446a191260f58e80a34614751a Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 30 Dec 2020 17:39:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B8=82=E5=9C=BA=E9=83=A8?= =?UTF-8?q?=E6=AF=9B=E5=88=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MarketPercentageController.class.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Application/Admin/Controller/MarketPercentageController.class.php b/Application/Admin/Controller/MarketPercentageController.class.php index d2df1b42f..b02fecdc1 100644 --- a/Application/Admin/Controller/MarketPercentageController.class.php +++ b/Application/Admin/Controller/MarketPercentageController.class.php @@ -33,7 +33,7 @@ class MarketPercentageController extends ThinkController // $_REQUEST['pay_time']?($map['pay_time'] = $_REQUEST['pay_time']):''; $_REQUEST['promote_id']?($map['promote_id'] = $_REQUEST['promote_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['company_id']||$_REQUEST['company_id']=='0')?($map['company_id'] = $_REQUEST['company_id']):''; @@ -103,11 +103,10 @@ class MarketPercentageController extends ThinkController // dump($map);die(); // var_dump($map);die(); - $data = M("settleup_marketorder","tab_") - ->field("pay_time,promote_account,company_name,company_belong,member.real_name,develop_type,game_name, + $data = SM("settleup_marketorder","tab_") + ->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(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"); + sum(channel_amount) channel_amount, sum(company_tax) company_tax,sum(company_profit) company_profit"); if ($_REQUEST['export']) { $data = $data->where($map) @@ -122,7 +121,7 @@ class MarketPercentageController extends ThinkController ->select(); } - $sum = M("settleup_marketorder","tab_") + $sum = SM("settleup_marketorder","tab_") ->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(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); } - $count = M("settleup_marketorder","tab_") + $count = SM("settleup_marketorder","tab_") + ->field("promote_id,game_name,pay_time,admin_id") ->where($map) ->group("promote_id,game_name,pay_time,admin_id") - ->select(false); - - $count = M()->table("({$count}) count")->count(); + ->select(); + $count = count($count); + // $count = M()->table("({$count}) count")->count(); $page = set_pagination($count, $row); if ($page) {