From 8e18e8faac9e00cdf0d2301bb37061d7ded303f3 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 22 Nov 2019 16:30:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=AE=98=E6=96=B9=E6=B8=A0=E9=81=93=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PlatformController.class.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index 965da8b24..393455386 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -387,6 +387,23 @@ class PlatformController extends ThinkController ->group('tp1.id') ->order('count desc, register_time') ->select(); + + //官方渠道数据添加 + $authorityData = M('user', 'tab_')->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(id) as count, + count(IF(register_time ' . $today . ',1,null)) as today, + count(IF(register_time ' . $week . ',1,null)) as week, + count(IF(register_time ' . $mounth . ',1,null)) as mounth') + ->where(['promote_id'=>0]) + ->find(); + $authorityData['promote_account'] = "官方渠道"; + $authorityData['id'] = "1"; +// $authorityData = []; + + array_push($data, $authorityData); + //数据排序 + $last_names = array_column($data,'count'); + array_multisort($last_names,SORT_DESC,$data); + $count = count($data); foreach ($data as $key => $value) { static $i = 0;