From 0ff1089682e65a73ed0952a74e007296dedeaa16 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 27 Aug 2020 19:38:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/DepositController.class.php | 46 ++----------------- Application/Admin/View/Deposit/lists.html | 2 +- 2 files changed, 6 insertions(+), 42 deletions(-) diff --git a/Application/Admin/Controller/DepositController.class.php b/Application/Admin/Controller/DepositController.class.php index 8034efa3d..483bdbbef 100644 --- a/Application/Admin/Controller/DepositController.class.php +++ b/Application/Admin/Controller/DepositController.class.php @@ -71,7 +71,8 @@ class DepositController extends ThinkController { } unset($_REQUEST['pay_way']); } - if ($_REQUEST['merchant_id']) { + + if ($_REQUEST['merchant_id'] && $_REQUEST['merchant_id'] != 0) { $map['merchant_id'] = $_REQUEST['merchant_id']; unset($_REQUEST['merchant_id']); } @@ -92,46 +93,9 @@ class DepositController extends ThinkController { $map1=$map; $map1['pay_status']=1; -// if($_REQUEST['promote_id']||$_REQUEST['promote_id']=='0') { -// $page = intval($p); -// $page = $page ? $page : 1; //默认显示第一页数据 -// if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} -// $map1['order_status'] = 1; -// unset($map1['pay_status']); -// if ($map['pay_status']) { -// $map['order_status']=$map['pay_status']; -// } -// -// $total=null_to_0(D('coin_pay_order')->where($map1)->sum('pay_amount')); -// $ttotal=null_to_0(D('coin_pay_order')->where('create_time'.total(1))->where(array('pay_status'=>1))->sum('pay_amount')); -// $ytotal=null_to_0(D('coin_pay_order')->where('create_time'.total(5))->where(array('pay_status'=>1))->sum('pay_amount')); -// $this->assign('total',$total); -// $this->assign('ttotal',$ttotal); -// $this->assign('ytotal',$ytotal); -// -// $data = D('coin_pay_order') -// /* 查询指定字段,不指定则查询所有字段 */ -// ->field('*,order_status as pay_status') -// // 查询条件 -// ->where($map) -// /* 默认通过id逆序排列 */ -// ->order("id desc") -// /* 数据分页 */ -// ->page($page, $row) -// /* 执行查询 */ -// ->select(); -// -// /* 查询记录总数 */ -// $count = D('coin_pay_order')->where($map)->count(); -// -// $page = set_pagination($count,$row); -// if($page) {$this->assign('_page', $page);} -// -// $this->assign('list_data', $data); -// $this->meta_title = '平台币充值列表'; -// $this->display('lists');die(); -// } $this->checkListOrCountAuthRestMap($map,[]); + + $total=null_to_0(D(self::model_name)->where($map1)->sum('pay_amount')); $ttotal=null_to_0(D(self::model_name)->where('create_time'.total(1))->where(array('pay_status'=>1))->sum('pay_amount')); $ytotal=null_to_0(D(self::model_name)->where('create_time'.total(5))->where(array('pay_status'=>1))->sum('pay_amount')); @@ -145,7 +109,7 @@ class DepositController extends ThinkController { $this->assign("is_admin",is_administrator()); $show_data_power = (is_administrator()|| session('user_auth')['show_data']); $this->assign('show_data_power', $show_data_power); - parent::lists(self::model_name,$_GET["p"],$map); + parent::lists(self::model_name, $_GET["p"], $map); } public function lists_secord() { diff --git a/Application/Admin/View/Deposit/lists.html b/Application/Admin/View/Deposit/lists.html index 8b9a258d9..99256ec9d 100644 --- a/Application/Admin/View/Deposit/lists.html +++ b/Application/Admin/View/Deposit/lists.html @@ -83,7 +83,7 @@