diff --git a/Application/Admin/Controller/TestingResourceController.class.php b/Application/Admin/Controller/TestingResourceController.class.php index 4a6bf577d..7be46a84f 100644 --- a/Application/Admin/Controller/TestingResourceController.class.php +++ b/Application/Admin/Controller/TestingResourceController.class.php @@ -243,6 +243,32 @@ class TestingResourceController extends ThinkController $this->assign('records', $records); $this->display(); } + public function dailyCountTip() + { + $tipApply = 10000; + $params = [ + 'create_time_start'=>date("Y-m-d",strtotime("-1 day")), + 'create_time_end'=>date("Y-m-d",time()), + ]; + $where = $this->setDailyCountWhere($params); + $having = 'apply_amount >= '.$tipApply; + $dbdata = 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") + ->having($having) + ->select(); + $repository = new TestingResourceRepository(); + $records = $repository->makeDailyCountTipData($dbdata); + //获取跳转连接 + $jumpParm = [ + 'apply_amount_start'=>$tipApply, + 'create_time_start'=>$params['create_time_start'], + 'create_time_end'=>$params['create_time_end'] + ]; + $jumpUrl = U("TestingResource/dailyCount",$jumpParm); + $this->ajaxReturn(['status'=>1,'count'=>count($records),'list'=>$records,'jump'=>$jumpUrl]); + } //每日统计 public function dailyCount() { diff --git a/Application/Admin/View/Index/index.html b/Application/Admin/View/Index/index.html index 936a4e2e4..e602b0d54 100644 --- a/Application/Admin/View/Index/index.html +++ b/Application/Admin/View/Index/index.html @@ -14,6 +14,9 @@ + + +