diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php index a680fc63c..25b7fd15a 100644 --- a/Application/Admin/Controller/SpendController.class.php +++ b/Application/Admin/Controller/SpendController.class.php @@ -137,11 +137,14 @@ class SpendController extends ThinkController // } $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')); + if ($payStatus > 0) { + $map1 = $map; + $map1['pay_status'] = 1; + $total = null_to_0(M(self::model_name, "tab_")->where($map1)->sum('pay_amount')); + } + $total=$total?$total:0; $this->assign('total', $total); + $this->meta_title = $this->m_title = '游戏充值'; $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Spend/lists', 'status' => 1])->find());