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)){