diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index 4531cf3dd..382c16c2a 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -256,7 +256,12 @@ class PlatformController extends ThinkController "pay_status"=>1 ]; D("Spend")->addSubsiteWhere($map); - $Payamount = M("Spend","tab_")->field("sum(IF(is_check=1,pay_amount,0)) pay_amount,IFNULL(sum(IF(is_check=2,pay_amount,0)),0) unpay_amount,FROM_UNIXTIME(`pay_time`, '%Y-%m') paytime")->where($map)->group("paytime")->select(); + if(IS_SUBSITE){ + $SpendModel = M("Spend","tab_",SUBSITE_DB); + }else{ + $SpendModel = M("Spend","tab_"); + } + $Payamount = $SpendModel->field("sum(IF(is_check=1,pay_amount,0)) pay_amount,IFNULL(sum(IF(is_check=2,pay_amount,0)),0) unpay_amount,FROM_UNIXTIME(`pay_time`, '%Y-%m') paytime")->where($map)->group("paytime")->select(); if(empty($Payamount)) return ; foreach ($Payamount as $v) { $list[$v['paytime']]['payamount'] = $v['pay_amount']; @@ -271,7 +276,12 @@ class PlatformController extends ThinkController "pay_time"=>["between",$yearMap], "pay_status"=>1 ]; - $Payamount = M("Spend","tab_")->field("sum(IF(is_check=2,pay_amount,0)) pay_amount,FROM_UNIXTIME(`pay_time`, '%Y-%m') paytime")->where($map)->group("paytime")->select(); + if(IS_SUBSITE){ + $SpendModel = M("Spend","tab_",SUBSITE_DB); + }else{ + $SpendModel = M("Spend","tab_"); + } + $Payamount = $SpendModel->field("sum(IF(is_check=2,pay_amount,0)) pay_amount,FROM_UNIXTIME(`pay_time`, '%Y-%m') paytime")->where($map)->group("paytime")->select(); if(empty($Payamount)) return ; foreach ($Payamount as $v) { $list[$v['paytime']]['unpayamount'] = $v['pay_amount']; diff --git a/Application/Admin/View/Platform/promote_pool.html b/Application/Admin/View/Platform/promote_pool.html index dbca80e3b..237e588bb 100644 --- a/Application/Admin/View/Platform/promote_pool.html +++ b/Application/Admin/View/Platform/promote_pool.html @@ -40,7 +40,7 @@ 推广员充值统计
说明:统计各工会每月注册及充值总额(注册数:以玩家最后归属的公会为准,非去重)
+说明:统计各工会每月注册及充值总额(注册数:以玩家最后归属的公会为准,非去重)