diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 88e78320a..fe12aeb59 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -759,7 +759,7 @@ class FinanceController extends ThinkController } public function gameStatisticsDetail($p = 1) { - set_time_limit(0); + if (isset($_REQUEST['pay_way'])) { $map['pay_way'] = $_REQUEST['pay_way']; @@ -831,6 +831,7 @@ class FinanceController extends ThinkController $order = "pay_time DESC"; $data = D('spend')->getSpendData($map,$field,$group,$order,$page,$row); + foreach($data as $key => $value) { $data[$key]['pay_way'] = getPayType($value['pay_way']); } @@ -847,16 +848,15 @@ class FinanceController extends ThinkController $this->assign('sumInside', $sumInside); $this->assign('sumAll', null_to_0($sumAll)); - $count = D("spend")->getSpendData($map,$field,$group,$order); + $count = D("spend")->getSpendData($map,'count(*) as count',$group,$order); - $count = count($count); + $count = $count[0]['count']; $page = set_pagination($count,$row); if($page) {$this->assign('_page', $page);} $this->meta_title = '游戏订单查看'; $this->assign('data',$data); - $from = I('from', ''); - $this->display($from); + $this->display(); } public function coinDetail($p = 1) { diff --git a/Application/Admin/Controller/RepairController.class.php b/Application/Admin/Controller/RepairController.class.php index 02f23d354..05de1242c 100644 --- a/Application/Admin/Controller/RepairController.class.php +++ b/Application/Admin/Controller/RepairController.class.php @@ -166,6 +166,17 @@ class RepairController extends ThinkController { M($tab, 'tab_')->commit(); } } else { // deposit + $user = M("user","tab_"); + $r = $user->where("id=".$order['user_id'])->setInc("balance", $order['pay_amount']); + if ($r === false) { + M($tab, 'tab_')->rollback(); + $this->ajaxReturn(array('status'=>1,'msg'=>'数据有误.')); + } + $r = $user->where("id=".$order['user_id'])->setInc("cumulative", $order['pay_amount']); + if ($r === false) { + M($tab, 'tab_')->rollback(); + $this->ajaxReturn(array('status'=>1,'msg'=>'数据有误..')); + } M('spend', 'tab_')->commit(); } diff --git a/Application/Admin/View/Finance/coinDetail.html b/Application/Admin/View/Finance/coinDetail.html index ce9338edc..1f4c58998 100644 --- a/Application/Admin/View/Finance/coinDetail.html +++ b/Application/Admin/View/Finance/coinDetail.html @@ -15,6 +15,7 @@ @@ -91,9 +93,10 @@