From 746388dd00a1804493e0c29d39d61627c4e4568f Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 27 Jan 2021 14:48:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/TestingResourceController.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/TestingResourceController.class.php b/Application/Admin/Controller/TestingResourceController.class.php index b5cf5ea88..c6baeacc9 100644 --- a/Application/Admin/Controller/TestingResourceController.class.php +++ b/Application/Admin/Controller/TestingResourceController.class.php @@ -275,6 +275,11 @@ class TestingResourceController extends ThinkController $page = I('p', 1); $row = I('row', 10); $params = I('get.'); + + if(!array_key_exists("create_time_start",$params) && !array_key_exists("create_time_end",$params)){ + $this->redirect(ACTION_NAME, array('create_time_start' => date('Y-m-d'),"create_time_end"=>date('Y-m-d'))); + } + $where = $this->setDailyCountWhere($params); $having = '1=1'; isset($params['apply_amount_start']) && !empty($params['apply_amount_start']) && ( $having .= ' and apply_amount >=' . $params['apply_amount_start']); @@ -284,7 +289,7 @@ class TestingResourceController extends ThinkController $query = M('testing_resource_batch','tab_') ->where($where)->field("FROM_UNIXTIME(create_time,'%Y-%m-%d') as create_day_time,user_id,role_id,game_id,apply_promote_id,apply_admin_id,verify_admin_id,sum(apply_amount) apply_amount,sum(provide_amount) provide_amount") ->group("role_id,game_id,create_day_time") - ->order("create_day_time desc") + ->order("apply_amount desc,create_day_time desc") ->having($having); $countsql = clone $query; if(empty($isExport)){