From 14ad9ce93dd4d25fcc7c349f8de48cd4cb59636f Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 22 Sep 2020 14:25:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=9A=E5=90=88=E5=85=AC=E5=8F=B8=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E5=8A=9F=E8=83=BD=E5=8F=8A=E6=B1=87=E6=80=BB=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E8=AF=AD=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/AggregateRelationController.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/AggregateRelationController.class.php b/Application/Admin/Controller/AggregateRelationController.class.php index 1dc77c810..7dc8fa918 100644 --- a/Application/Admin/Controller/AggregateRelationController.class.php +++ b/Application/Admin/Controller/AggregateRelationController.class.php @@ -172,12 +172,14 @@ class AggregateRelationController extends AdminController } // $this->checkListOrCountAuthRestMap($where);//导出权限 - $dbres = $this->DBlogModel->where("first_company_type = 3 or second_company_type = 3")->where($where)->order("FIELD(status,0,1,-1,-2,2),id desc"); + $dbress = $this->DBlogModel->where("first_company_type = 3 or second_company_type = 3")->order("FIELD(status,0,1,-1,-2,2),id desc")->select(false); + if(isset($params['export'])){ - $dbres = $dbres->select(); + $dbres = M()->table("({$dbress})a")->where($where)->select(); }else{ - $dbres = $dbres->page($page, $row)->select(); + $dbres = M()->table("({$dbress})a")->page($page, $row)->where($where)->select(); } + foreach($dbres as $k=>&$v){ $v['settlement_type'] =$this->SettlementType[$v['settlement_type']]; $v['first_company_type'] =$this->CompanyType[$v['first_company_type']]; @@ -239,7 +241,7 @@ class AggregateRelationController extends AdminController )); } - $count = $this->DBlogModel->field("count(id) count")->where($where)->where("first_company_type = 3 or second_company_type = 3")->find()['count']; + $count = M()->table("({$dbress})a")->field("count(id) count")->where($where)->find()['count']; $this->assign('data', $dbres); $page = set_pagination($count, $row,$params); if($page) {