From c91206c176ff80c21c204c22756ce3c45c5900f1 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 19 Mar 2021 10:42:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=A8=E5=B9=BF=E5=91=98?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PlatformController.class.php | 14 ++++++++++++-- Application/Admin/View/Platform/promote_pool.html | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) 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 @@ 推广员充值统计

推广员汇总

-

说明:统计各工会每月注册及充值总额(注册数:以玩家最后归属的公会为准,非去重)

+

说明:统计各工会每月注册及充值总额(注册数:以玩家最后归属的公会为准,非去重)/ 支付信息仅统计已固定的订单数据