From b19d73388b8dd0d6bb24603b2ade5a5ea3274bb5 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 19 Mar 2021 14:04:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E7=AB=99=E6=B8=B8=E6=88=8F=E8=AE=A2?= =?UTF-8?q?=E5=8D=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/SubSpendController.class.php | 38 +++++-------------- Application/Admin/View/SubSpend/lists.html | 2 +- 2 files changed, 10 insertions(+), 30 deletions(-) diff --git a/Application/Admin/Controller/SubSpendController.class.php b/Application/Admin/Controller/SubSpendController.class.php index 0ad202a02..0d0d1f8dd 100644 --- a/Application/Admin/Controller/SubSpendController.class.php +++ b/Application/Admin/Controller/SubSpendController.class.php @@ -75,20 +75,6 @@ class SubSpendController extends ThinkController unset($_REQUEST['merchant_id']); } - // $marketAdminId = 0; - // $isMarketAdmin = isMarketAdmin(); - // if ($isMarketAdmin) { - // $userAuth = session('user_auth'); - // $marketAdminId = $userAuth['uid']; - // } else { - // $marketAdminId = I('market_admin_id', 0); - // } - // if ($marketAdminId > 0) { - // $map['market_admin_id'] = $marketAdminId; - // } else { - // setPowerPromoteIds($map,'promote_id'); - // } - if (isset($_REQUEST['promote_id']) || isset($_REQUEST['company_id'])) { $promoteId = I('promote_id',-1); $companyId = I('company_id',-1); @@ -122,20 +108,7 @@ class SubSpendController extends ThinkController $map['game_id'] = ['in',$game_id]; } - // if (intval(($endTime + 1) - $startTime) / (24 * 3600) <= 31) { - // $map1 = $map; - // $map1['pay_status'] = 1; - // } else { - // $map = '1 = 2'; - // $map1 = $map; - // } - // $this->checkListOrCountAuthRestMap($map,["extend", "pay_order_number", "user_account"]); D("Spend")->addSubsiteWhere($map); - - $map1 = $map; - $map1['pay_status'] = 1; - $total = null_to_0(M(self::model_name,"tab_")->where($map1)->sum('pay_amount')); - $this->assign('total', $total); $this->meta_title = $this->m_title = '游戏充值'; $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Spend/lists', 'status' => 1])->find()); @@ -183,8 +156,11 @@ class SubSpendController extends ThinkController $endTime = strtotime($endDate) + 86399; $map['pay_time'] = array('BETWEEN', array($startTime, $endTime)); $is_sub_data = I("issubdata",0); - $SpendModel = M("spend","tab_",SUBSITE_DB); - + if($is_sub_data == 1){ + $SpendModel = M("spend","tab_",SUBSITE_DB); + }else{ + $SpendModel = M("spend","tab_"); + } unset($_REQUEST['timestart']); unset($_REQUEST['timeend']); @@ -661,6 +637,10 @@ class SubSpendController extends ThinkController if ($page) { $data['page'] = $page; } + + $total = null_to_0($SpendModel->where($map)->where("pay_status = 1")->sum('pay_amount')); + $this->assign('total', $total); + return $data; } diff --git a/Application/Admin/View/SubSpend/lists.html b/Application/Admin/View/SubSpend/lists.html index 99cfbafbb..f1ab220f9 100644 --- a/Application/Admin/View/SubSpend/lists.html +++ b/Application/Admin/View/SubSpend/lists.html @@ -370,7 +370,7 @@
- 导出 + 导出 {$_page|default=''}