From 13d0c6fa59c21de85afc6b48cec299b41b7995d5 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 27 Jan 2021 11:13:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A6=96=E9=A1=B5=E6=8F=90?= =?UTF-8?q?=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TestingResourceController.class.php | 26 +++ Application/Admin/View/Index/index.html | 166 +++++++++++++++++- .../TestingResourceRepository.class.php | 34 +++- 3 files changed, 223 insertions(+), 3 deletions(-) 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 @@ + + +
@@ -261,14 +264,173 @@
- + +
+ +