From 4473b200168c69a6ebbd42e5294eb8d7d3b5e03b Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 19 Dec 2019 11:29:17 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90sql?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Data/update.sql b/Data/update.sql index 18de63eb7..46354b68c 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -759,4 +759,10 @@ CREATE TABLE `tab_promote_count` ( KEY `new_user_count` (`new_user_count`) USING BTREE, KEY `active_user_count` (`active_user_count`) USING BTREE, KEY `pay_money_count` (`pay_money_count`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='总览推广员统计聚合'; \ No newline at end of file +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='总览推广员统计聚合'; + +--新增游戏聚合 2019-12-19 zyx +ALTER TABLE `sys_auth_group` +ADD COLUMN `data_empower_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '数据权限 1 全部 2 部分数据 3 自己底下的会长' AFTER `rules`; +ALTER TABLE `platform`.`sys_auth_group` +ADD COLUMN `data_president` longtext NULL COMMENT '会长数据' AFTER `data_empower_type`; \ No newline at end of file From afb655236442fd4e07e32f4f8993cefd7508869b Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Thu, 19 Dec 2019 15:56:06 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/PromoteCompany/edit.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index c66eb4666..505f819fd 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -59,7 +59,7 @@ - + 返回 From 4a7c9d7230a1b924271a3ac9c306e62036e348a6 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Thu, 19 Dec 2019 15:56:49 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/update.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Data/update.sql b/Data/update.sql index 46354b68c..c6d4a6cfb 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -765,4 +765,5 @@ CREATE TABLE `tab_promote_count` ( ALTER TABLE `sys_auth_group` ADD COLUMN `data_empower_type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '数据权限 1 全部 2 部分数据 3 自己底下的会长' AFTER `rules`; ALTER TABLE `platform`.`sys_auth_group` -ADD COLUMN `data_president` longtext NULL COMMENT '会长数据' AFTER `data_empower_type`; \ No newline at end of file +ADD COLUMN `data_president` longtext NULL COMMENT '会长数据' AFTER `data_empower_type`; + From fe5ae6a499ec40f74b7c1ecb50decc2b95fa0d03 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Thu, 19 Dec 2019 19:42:50 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=9A=84=E6=8E=A8?= =?UTF-8?q?=E5=B9=BF=E5=91=98=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 17 +++++++++++++---- Application/Admin/View/Apply/and_lists.html | 2 +- Application/Admin/View/Promote/agent_list.html | 2 +- Application/Admin/View/Promote/ch_reg_list.html | 2 +- Application/Admin/View/Promote/lists.html | 2 +- Application/Admin/View/Promote/spend_list.html | 2 +- 6 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 882be5ec0..4a057a759 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -37,17 +37,22 @@ function get_user_big_info($id=0, $flag=false) { * @author 鹿文学 */ function get_promote_list_by_id($id=0) { + //为数据权限修改 2019-12-19 lww + $query = M("Promote","tab_")->field('id,account,balance_coin'); + $map = array(); + setPowerPromoteIds($map, 'id'); if(is_numeric($id) && $id>=0) { - $list = M("Promote","tab_")->field('id,account,balance_coin')->where(['parent_id'=>$id])->select(); + $map['parent_id'] = $id; + $list = $query->where($map)->select(); } elseif(is_array($id)) { - $list = M("Promote","tab_")->field('id,account,balance_coin')->where(['parent_id'=>array('in',$id)])->select(); + $map['parent_id'] = array('in',$id); + $list = $query->where($map)->select(); } elseif(is_numeric($id) && $id<0){ - $list = M("Promote","tab_")->field('id,account,balance_coin')->select(); + $list = $query->where($map)->select(); } else { $list = ''; } - return $list; } @@ -202,6 +207,8 @@ function get_promote_list($select='') { function get_all_toppromote(){ $map['status']=1; $map['level']=['lt', 4]; + //为数据权限添加 + setPowerPromoteIds($map, 'id'); $list = M("Promote","tab_")->where($map)->select(); if (empty($list)){return '';} return $list; @@ -584,6 +591,8 @@ function promote_lists($type){ } else{ $map = ''; } + //为数据权限添加 + setPowerPromoteIds($map, 'id'); $data = M('promote','tab_')->where($map)->select(); $items = M('PromoteBalanceCoin', 'tab_')->where(['game_id' => 0])->select(); diff --git a/Application/Admin/View/Apply/and_lists.html b/Application/Admin/View/Apply/and_lists.html index 4bd2de52d..247d69b8a 100644 --- a/Application/Admin/View/Apply/and_lists.html +++ b/Application/Admin/View/Apply/and_lists.html @@ -66,7 +66,7 @@
diff --git a/Application/Admin/View/Promote/agent_list.html b/Application/Admin/View/Promote/agent_list.html index ea7c8541a..cd6182cd6 100644 --- a/Application/Admin/View/Promote/agent_list.html +++ b/Application/Admin/View/Promote/agent_list.html @@ -55,7 +55,7 @@
diff --git a/Application/Admin/View/Promote/ch_reg_list.html b/Application/Admin/View/Promote/ch_reg_list.html index 452be0303..823ced068 100644 --- a/Application/Admin/View/Promote/ch_reg_list.html +++ b/Application/Admin/View/Promote/ch_reg_list.html @@ -68,7 +68,7 @@ background-color: #FF9797;
diff --git a/Application/Admin/View/Promote/lists.html b/Application/Admin/View/Promote/lists.html index 7e7b6ca0d..68a5869c1 100644 --- a/Application/Admin/View/Promote/lists.html +++ b/Application/Admin/View/Promote/lists.html @@ -78,7 +78,7 @@
diff --git a/Application/Admin/View/Promote/spend_list.html b/Application/Admin/View/Promote/spend_list.html index 1f3e7e7d2..aefb5e018 100644 --- a/Application/Admin/View/Promote/spend_list.html +++ b/Application/Admin/View/Promote/spend_list.html @@ -96,7 +96,7 @@ background-color: #FF9797;