From cfd032b1fa6a4451a3a53d0faf02599552689100 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Mon, 23 Dec 2019 19:49:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/ExportController.class.php | 5 +++-- Application/Admin/Controller/PlatformController.class.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index fe36f71ab..70b6c1cf6 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -2545,7 +2545,7 @@ class ExportController extends Controller $map['tp1.chain'] = '/'; } //为数据权限添加 - setPowerPromoteIds($map); + setPowerPromoteIds($map, 'u.promote_id'); $data = M('promote', 'tab_')->alias('tp1')->field('tp1.account as promote_account,tp1.id, date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(u.id) as count, count(IF(register_time ' . $today . ',1,null)) as today, count(IF(register_time ' . $week . ',1,null)) as week, @@ -2564,7 +2564,8 @@ class ExportController extends Controller $user_auth_promote_ids = session('user_auth_promote_ids'); if ($user_auth_promote_ids == 'all' || in_array('0', explode(",", $user_auth_promote_ids))) { //官方渠道数据添加 - $authorityData = M('user', 'tab_')->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, + $authorityData = M('user', 'tab_')->alias('u') + ->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, diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index e24602a2e..7626b439f 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -392,7 +392,7 @@ class PlatformController extends ThinkController } //为数据权限添加 - setPowerPromoteIds($map); + setPowerPromoteIds($map, 'u.promote_id'); $data = M('promote', 'tab_')->alias('tp1') ->field('tp1.account as promote_account,tp1.id, @@ -417,7 +417,8 @@ class PlatformController extends ThinkController $user_auth_promote_ids = session('user_auth_promote_ids'); if ($user_auth_promote_ids == 'all' || in_array('0', explode(",", $user_auth_promote_ids))) { //官方渠道数据添加 - $authorityData = M('user', 'tab_')->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, + $authorityData = M('user', 'tab_')->alias('u') + ->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,