一、权限管理需求描述
不同角色的用户登录后台管理系统拥有不同的菜单权限与功能权限,权限管理包含三个功能模块:
菜单管理、角色管理和用户管理
1、菜单管理
(1)菜单列表:使用树形结构显示菜单列表
(2)添加菜单:点击添加菜单,弹框进行添加
(3)修改菜单
(4)删除菜单
2、角色管理
(1)角色列表:实现角色的条件查询带分页功能
(2)角色添加
(3)角色修改
(4)角色删除
- 普通删除
- 批量删除
(5)角色分配菜单
3、用户管理
(1)用户列表
(2)用户添加
(3)用户修改
(4)用户删除
(5)用户分配角色
# Host: localhost (Version 5.7.19)
# Date: 2019-11-18 15:49:15
# Generator: MySQL-Front 6.1 (Build 1.26)
#
# Structure for table "acl_permission"
#
CREATE TABLE `acl_permission` (
`id` char(19) NOT NULL DEFAULT '' COMMENT '编号',
`pid` char(19) NOT NULL DEFAULT '' COMMENT '所属上级',
`name` varchar(20) NOT NULL DEFAULT '' COMMENT '名称',
`type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '类型(1:菜单,2:按钮)',
`permission_value` varchar(50) DEFAULT NULL COMMENT '权限值',
`path` varchar(100) DEFAULT NULL COMMENT '访问路径',
`component` varchar(100) DEFAULT NULL COMMENT '组件路径',
`icon` varchar(50) DEFAULT NULL COMMENT '图标',
`status` tinyint(4) DEFAULT NULL COMMENT '状态(0:禁止,1:正常)',
`is_deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
`gmt_modified` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_pid` (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='权限';
#
# Data for table "acl_permission"
#
INSERT INTO `acl_permission` VALUES ('1','0','全部数据',0,NULL,NULL,NULL,NULL,NULL,0,'2019-11-15 17:13:06','2019-11-15 17:13:06'),('1195268474480156673','1','权限管理',1,NULL,'/acl','Layout',NULL,NULL,0,'2019-11-15 17:13:06','2019-11-18 13:54:25'),('1195268616021139457','1195268474480156673','用户管理',1,NULL,'user/list','/acl/user/list',NULL,NULL,0,'2019-11-15 17:13:40','2019-11-18 13:53:12'),('1195268788138598401','1195268474480156673','角色管理',1,NULL,'role/list','/acl/role/list',NULL,NULL,0,'2019-11-15 17:14:21','2019-11-15 17:14:21'),('1195268893830864898','1195268474480156673','菜单管理',1,NULL,'menu/list','/acl/menu/list',NULL,NULL,0,'2019-11-15 17:14:46','2019-11-15 17:14:46'),('1195269143060602882','1195268616021139457','查看',2,'user.list','','',NULL,NULL,0,'2019-11-15 17:15:45','2019-11-17 21:57:16'),('1195269295926206466','1195268616021139457','添加',2,'user.add','user/add','/acl/user/form',NULL,NULL,0,'2019-11-15 17:16:22','2019-11-15 17:16:22'),('1195269473479483394','1195268616021139457','修改',2,'user.update','user/update/:id','/acl/user/form',NULL,NULL,0,'2019-11-15 17:17:04','2019-11-15 17:17:04'),('1195269547269873666','1195268616021139457','删除',2,'user.remove','','',NULL,NULL,0,'2019-11-15 17:17:22','2019-11-15 17:17:22'),('1195269821262782465','1195268788138598401','修改',2,'role.update','role/update/:id','/acl/role/form',NULL,NULL,0,'2019-11-15 17:18:27','2019-11-15 17:19:53'),('1195269903542444034','1195268788138598401','查看',2,'role.list','','',NULL,NULL,0,'2019-11-15 17:18:47','2019-11-15 17:18:47'),('1195270037005197313','1195268788138598401','添加',2,'role.add','role/add','/acl/role/form',NULL,NULL,0,'2019-11-15 17:19:19','2019-11-18 11:05:42'),('1195270442602782721','1195268788138598401','删除',2,'role.remove','','',NULL,NULL,0,'2019-11-15 17:20:55','2019-11-15 17:20:55'),('1195270621548568578','1195268788138598401','角色权限',2,'role.acl','role/distribution/:id','/acl/role/roleForm',NULL,NULL,0,'2019-11-15 17:21:38','2019-11-15 17:21:38'),('1195270744097742849','1195268893830864898','查看',2,'permission.list','','',NULL,NULL,0,'2019-11-15 17:22:07','2019-11-15 17:22:07'),('1195270810560684034','1195268893830864898','添加',2,'permission.add','','',NULL,NULL,0,'2019-11-15 17:22:23','2019-11-15 17:22:23'),('1195270862100291586','1195268893830864898','修改',2,'permission.update','','',NULL,NULL,0,'2019-11-15 17:22:35','2019-11-15 17:22:35'),('1195270887933009922','1195268893830864898','删除',2,'permission.remove','','',NULL,NULL,0,'2019-11-15 17:22:41','2019-11-15 17:22:41'),('1195349439240048642','1','讲师管理',1,NULL,'/edu/teacher','Layout',NULL,NULL,0,'2019-11-15 22:34:49','2019-11-15 22:34:49'),('1195349699995734017','1195349439240048642','讲师列表',1,NULL,'list','/edu/teacher/list',NULL,NULL,0,'2019-11-15 22:35:52','2019-11-15 22:35:52'),('1195349810561781761','1195349439240048642','添加讲师',1,NULL,'create','/edu/teacher/form',NULL,NULL,0,'2019-11-15 22:36:18','2019-11-15 22:36:18'),('1195349876252971010','1195349810561781761','添加',2,'teacher.add','','',NULL,NULL,0,'2019-11-15 22:36:34','2019-11-15 22:36:34'),('1195349979797753857','1195349699995734017','查看',2,'teacher.list','','',NULL,NULL,0,'2019-11-15 22:36:58','2019-11-15 22:36:58'),('1195350117270261762','1195349699995734017','修改',2,'teacher.update','edit/:id','/edu/teacher/form',NULL,NULL,0,'2019-11-15 22:37:31','2019-11-15 22:37:31'),('1195350188359520258','1195349699995734017','删除',2,'teacher.remove','','',NULL,NULL,0,'2019-11-15 22:37:48','2019-11-15 22:37:48'),('1195350299365969922','1','课程分类',1,NULL,'/edu/subject','Layout',NULL,NULL,0,'2019-11-15 22:38:15','2019-11-15 22:38:15'),('1195350397751758850','1195350299365969922','课程分类列表',1,NULL,'list','/edu/subject/list',NULL,NULL,0,'2019-11-15 22:38:38','2019-11-15 22:38:38'),('1195350500512206850','1195350299365969922','导入课程分类',1,NULL,'import','/edu/subject/import',NULL,NULL,0,'2019-11-15 22:39:03','2019-11-15 22:39:03'),('1195350612172967938','1195350397751758850','查看',2,'subject.list','','',NULL,NULL,0,'2019-11-15 22:39:29','2019-11-15 22:39:29'),('1195350687590748161','1195350500512206850','导入',2,'subject.import','','',NULL,NULL,0,'2019-11-15 22:39:47','2019-11-15 22:39:47'),('1195350831744782337','1','课程管理',1,NULL,'/edu/course','Layout',NULL,NULL,0,'2019-11-15 22:40:21','2019-11-15 22:40:21'),('1195350919074385921','1195350831744782337','课程列表',1,NULL,'list','/edu/course/list',NULL,NULL,0,'2019-11-15 22:40:42','2019-11-15 22:40:42'),('1195351020463296513','1195350831744782337','发布课程',1,NULL,'info','/edu/course/info',NULL,NULL,0,'2019-11-15 22:41:06','2019-11-15 22:41:06'),('1195351159672246274','1195350919074385921','完成发布',2,'course.publish','publish/:id','/edu/course/publish',NULL,NULL,0,'2019-11-15 22:41:40','2019-11-15 22:44:01'),('1195351326706208770','1195350919074385921','编辑课程',2,'course.update','info/:id','/edu/course/info',NULL,NULL,0,'2019-11-15 22:42:19','2019-11-15 22:42:19'),('1195351566221938690','1195350919074385921','编辑课程大纲',2,'chapter.update','chapter/:id','/edu/course/chapter',NULL,NULL,0,'2019-11-15 22:43:17','2019-11-15 22:43:17'),('1195351862889254913','1','统计分析',1,NULL,'/statistics/daily','Layout',NULL,NULL,0,'2019-11-15 22:44:27','2019-11-15 22:44:27'),('1195351968841568257','1195351862889254913','生成统计',1,NULL,'create','/statistics/daily/create',NULL,NULL,0,'2019-11-15 22:44:53','2019-11-15 22:44:53'),('1195352054917074946','1195351862889254913','统计图表',1,NULL,'chart','/statistics/daily/chart',NULL,NULL,0,'2019-11-15 22:45:13','2019-11-15 22:45:13'),('1195352127734386690','1195352054917074946','查看',2,'daily.list','','',NULL,NULL,0,'2019-11-15 22:45:30','2019-11-15 22:45:30'),('1195352215768633346','1195351968841568257','生成',2,'daily.add','','',NULL,NULL,0,'2019-11-15 22:45:51','2019-11-15 22:45:51'),('1195352547621965825','1','CMS管理',1,NULL,'/cms','Layout',NULL,NULL,0,'2019-11-15 22:47:11','2019-11-18 10:51:46'),('1195352856645701633','1195353513549205505','查看',2,'banner.list','',NULL,NULL,NULL,0,'2019-11-15 22:48:24','2019-11-15 22:48:24'),('1195352909401657346','1195353513549205505','添加',2,'banner.add','banner/add','/cms/banner/form',NULL,NULL,0,'2019-11-15 22:48:37','2019-11-18 10:52:10'),('1195353051395624961','1195353513549205505','修改',2,'banner.update','banner/update/:id','/cms/banner/form',NULL,NULL,0,'2019-11-15 22:49:11','2019-11-18 10:52:05'),('1195353513549205505','1195352547621965825','Bander列表',1,NULL,'banner/list','/cms/banner/list',NULL,NULL,0,'2019-11-15 22:51:01','2019-11-18 10:51:29'),('1195353672110673921','1195353513549205505','删除',2,'banner.remove','','',NULL,NULL,0,'2019-11-15 22:51:39','2019-11-15 22:51:39'),('1195354076890370050','1','订单管理',1,NULL,'/order','Layout',NULL,NULL,0,'2019-11-15 22:53:15','2019-11-15 22:53:15'),('1195354153482555393','1195354076890370050','订单列表',1,NULL,'list','/order/list',NULL,NULL,0,'2019-11-15 22:53:33','2019-11-15 22:53:58'),('1195354315093282817','1195354153482555393','查看',2,'order.list','','',NULL,NULL,0,'2019-11-15 22:54:12','2019-11-15 22:54:12'),('1196301740985311234','1195268616021139457','分配角色',2,'user.assgin','user/role/:id','/acl/user/roleForm',NULL,NULL,0,'2019-11-18 13:38:56','2019-11-18 13:38:56');
#
# Structure for table "acl_role"
#
CREATE TABLE `acl_role` (
`id` char(19) NOT NULL DEFAULT '' COMMENT '角色id',
`role_name` varchar(20) NOT NULL DEFAULT '' COMMENT '角色名称',
`role_code` varchar(20) DEFAULT NULL COMMENT '角色编码',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`is_deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#
# Data for table "acl_role"
#
INSERT INTO `acl_role` VALUES ('1','普通管理员',NULL,NULL,0,'2019-11-11 13:09:32','2019-11-18 10:27:18'),('1193757683205607426','课程管理员',NULL,NULL,0,'2019-11-11 13:09:45','2019-11-18 10:25:44'),('1196300996034977794','test',NULL,NULL,0,'2019-11-18 13:35:58','2019-11-18 13:35:58');
#
# Structure for table "acl_role_permission"
#
CREATE TABLE `acl_role_permission` (
`id` char(19) NOT NULL DEFAULT '',
`role_id` char(19) NOT NULL DEFAULT '',
`permission_id` char(19) NOT NULL DEFAULT '',
`is_deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_role_id` (`role_id`),
KEY `idx_permission_id` (`permission_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色权限';
#
# Data for table "acl_role_permission"
#
INSERT INTO `acl_role_permission` VALUES ('1196301979754455041','1','1',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301979792203778','1','1195268474480156673',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301979821563906','1','1195268616021139457',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301979842535426','1','1195269143060602882',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301979855118338','1','1195269295926206466',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301979880284161','1','1195269473479483394',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301979913838593','1','1195269547269873666',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301979926421506','1','1196301740985311234',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301979951587330','1','1195268788138598401',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980014501889','1','1195269821262782465',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980035473410','1','1195269903542444034',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980052250626','1','1195270037005197313',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980077416450','1','1195270442602782721',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980094193665','1','1195270621548568578',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980119359489','1','1195268893830864898',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980136136706','1','1195270744097742849',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980249382913','1','1195270810560684034',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980270354434','1','1195270862100291586',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980287131649','1','1195270887933009922',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980303908866','1','1195349439240048642',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980320686082','1','1195349699995734017',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980345851905','1','1195349979797753857',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980362629121','1','1195350117270261762',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980383600641','1','1195350188359520258',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980408766465','1','1195349810561781761',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980421349378','1','1195349876252971010',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980438126593','1','1195350299365969922',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980450709506','1','1195350397751758850',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980501041153','1','1195350612172967938',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980517818370','1','1195350500512206850',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980538789889','1','1195350687590748161',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980622675970','1','1195350831744782337',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980639453186','1','1195350919074385921',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980660424705','1','1195351159672246274',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980677201922','1','1195351326706208770',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980698173441','1','1195351566221938690',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980714950658','1','1195351020463296513',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980723339266','1','1195351862889254913',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980744310786','1','1195351968841568257',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980761088001','1','1195352215768633346',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980777865217','1','1195352054917074946',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980794642434','1','1195352127734386690',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980811419650','1','1195352547621965825',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980828196865','1','1195353513549205505',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980844974082','1','1195352856645701633',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980861751298','1','1195352909401657346',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980886917122','1','1195353051395624961',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980928860162','1','1195353672110673921',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980954025986','1','1195354076890370050',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980970803201','1','1195354153482555393',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196301980987580418','1','1195354315093282817',1,'2019-11-18 13:39:53','2019-11-18 13:39:53'),('1196305293070077953','1','1',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293099438081','1','1195268474480156673',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293120409602','1','1195268616021139457',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293153964034','1','1195269143060602882',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293183324162','1','1195269295926206466',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293212684290','1','1195269473479483394',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293237850114','1','1195269547269873666',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293271404545','1','1196301740985311234',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293485314049','1','1195268788138598401',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293506285569','1','1195269821262782465',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293527257089','1','1195269903542444034',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293552422914','1','1195270037005197313',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293565005825','1','1195270442602782721',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293594365954','1','1195270621548568578',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293611143169','1','1195268893830864898',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293627920385','1','1195270744097742849',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293657280513','1','1195349439240048642',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293674057729','1','1195349699995734017',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293690834946','1','1195349979797753857',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293716000770','1','1195350117270261762',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293736972290','1','1195350188359520258',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293749555202','1','1195349810561781761',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293766332417','1','1195349876252971010',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293795692546','1','1195350299365969922',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293812469762','1','1195350397751758850',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293837635586','1','1195350612172967938',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293858607106','1','1195350500512206850',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293875384322','1','1195350687590748161',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293892161538','1','1195350831744782337',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293950881794','1','1195350919074385921',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305293976047617','1','1195351159672246274',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294127042561','1','1195351326706208770',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294156402690','1','1195351566221938690',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294177374209','1','1195351862889254913',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294194151425','1','1195351968841568257',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294223511554','1','1195352215768633346',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294240288770','1','1195352054917074946',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294248677377','1','1195352127734386690',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294248677378','1','1195352547621965825',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294319980546','1','1195353513549205505',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294319980547','1','1195352856645701633',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294319980548','1','1195352909401657346',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294378700802','1','1195353051395624961',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294378700803','1','1195353672110673921',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294458392577','1','1195354076890370050',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294483558402','1','1195354153482555393',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305294500335618','1','1195354315093282817',1,'2019-11-18 13:53:03','2019-11-18 13:53:03'),('1196305566656139266','1','1',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566689693698','1','1195268474480156673',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566706470913','1','1195268616021139457',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566740025346','1','1195269143060602882',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566756802561','1','1195269295926206466',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566781968385','1','1195269473479483394',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566811328514','1','1195269547269873666',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566828105730','1','1196301740985311234',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566853271554','1','1195268788138598401',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566878437378','1','1195269821262782465',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566895214593','1','1195269903542444034',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566916186113','1','1195270037005197313',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566949740546','1','1195270442602782721',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566966517761','1','1195270621548568578',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305566991683585','1','1195268893830864898',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567012655106','1','1195270744097742849',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567029432322','1','1195270810560684034',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567042015233','1','1195270862100291586',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567100735490','1','1195270887933009922',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567117512705','1','1195349439240048642',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567142678530','1','1195349699995734017',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567155261442','1','1195349979797753857',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567172038658','1','1195350117270261762',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567188815873','1','1195350188359520258',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567218176001','1','1195349810561781761',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567234953217','1','1195349876252971010',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567251730434','1','1195350299365969922',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567272701954','1','1195350397751758850',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567289479170','1','1195350612172967938',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567310450690','1','1195350500512206850',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567327227905','1','1195350687590748161',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567448862722','1','1195350831744782337',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567478222850','1','1195350919074385921',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567495000065','1','1195351159672246274',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567520165889','1','1195351326706208770',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567541137409','1','1195351566221938690',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567570497538','1','1195351862889254913',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567587274754','1','1195351968841568257',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567604051970','1','1195352215768633346',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567633412098','1','1195352054917074946',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567683743745','1','1195352127734386690',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567721492481','1','1195352547621965825',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567742464002','1','1195353513549205505',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567771824129','1','1195352856645701633',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567792795650','1','1195352909401657346',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567809572866','1','1195353051395624961',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567843127298','1','1195353672110673921',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567868293122','1','1195354076890370050',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567885070338','1','1195354153482555393',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196305567910236162','1','1195354315093282817',1,'2019-11-18 13:54:08','2019-11-18 13:54:08'),('1196312702601695234','1','1',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312702652026881','1','1195268474480156673',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312702668804098','1','1195268616021139457',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312702698164226','1','1195269143060602882',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312702723330049','1','1195269295926206466',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312702744301569','1','1195269473479483394',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312702765273089','1','1195269547269873666',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312702790438913','1','1196301740985311234',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312702945628161','1','1195268788138598401',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312702970793985','1','1195269821262782465',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312703000154114','1','1195269903542444034',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312703025319938','1','1195270037005197313',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312703046291458','1','1195270442602782721',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312703063068673','1','1195270621548568578',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312703084040193','1','1195268893830864898',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312703113400321','1','1195270744097742849',0,'2019-11-18 14:22:29','2019-11-18 14:22:29'),('1196312703134371842','1','1195270810560684034',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703159537665','1','1195270862100291586',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703184703490','1','1195270887933009922',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703209869313','1','1195349439240048642',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703230840834','1','1195349699995734017',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703251812354','1','1195349979797753857',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703272783873','1','1195350117270261762',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703293755394','1','1195350188359520258',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703327309826','1','1195349810561781761',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703348281345','1','1195349876252971010',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703365058561','1','1195350299365969922',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703386030082','1','1195350397751758850',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703440556034','1','1195350612172967938',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703486693378','1','1195350500512206850',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703511859202','1','1195350687590748161',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703654465537','1','1195350831744782337',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703683825665','1','1195350919074385921',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703700602882','1','1195351159672246274',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703717380098','1','1195351326706208770',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703738351618','1','1195351566221938690',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703759323137','1','1195351020463296513',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703776100353','1','1195351862889254913',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703792877570','1','1195351968841568257',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703830626305','1','1195352215768633346',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703843209217','1','1195352054917074946',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703868375041','1','1195352127734386690',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703889346561','1','1195352547621965825',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703901929473','1','1195353513549205505',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703918706689','1','1195352856645701633',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703952261121','1','1195352909401657346',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703973232642','1','1195353051395624961',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312703990009857','1','1195353672110673921',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312704048730114','1','1195354076890370050',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312704069701633','1','1195354153482555393',0,'2019-11-18 14:22:30','2019-11-18 14:22:30'),('1196312704094867457','1','1195354315093282817',0,'2019-11-18 14:22:30','2019-11-18 14:22:30');
#
# Structure for table "acl_user"
#
CREATE TABLE `acl_user` (
`id` char(19) NOT NULL COMMENT '会员id',
`username` varchar(20) NOT NULL DEFAULT '' COMMENT '微信openid',
`password` varchar(32) NOT NULL DEFAULT '' COMMENT '密码',
`nick_name` varchar(50) DEFAULT NULL COMMENT '昵称',
`salt` varchar(255) DEFAULT NULL COMMENT '用户头像',
`token` varchar(100) DEFAULT NULL COMMENT '用户签名',
`is_deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表';
#
# Data for table "acl_user"
#
INSERT INTO `acl_user` VALUES ('1','admin','96e79218965eb72c92a549dd5a330112','admin','',NULL,0,'2019-11-01 10:39:47','2019-11-01 10:39:47'),('2','test','96e79218965eb72c92a549dd5a330112','test',NULL,NULL,0,'2019-11-01 16:36:07','2019-11-01 16:40:08');
#
# Structure for table "acl_user_role"
#
CREATE TABLE `acl_user_role` (
`id` char(19) NOT NULL DEFAULT '' COMMENT '主键id',
`role_id` char(19) NOT NULL DEFAULT '0' COMMENT '角色id',
`user_id` char(19) NOT NULL DEFAULT '0' COMMENT '用户id',
`is_deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '逻辑删除 1(true)已删除, 0(false)未删除',
`gmt_create` datetime NOT NULL COMMENT '创建时间',
`gmt_modified` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_role_id` (`role_id`),
KEY `idx_user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
#
# Data for table "acl_user_role"
#
INSERT INTO `acl_user_role` VALUES ('1','1','2',0,'2019-11-11 13:09:53','2019-11-11 13:09:53');
一、创建权限管理服务
1、在service模块下创建子模块service-acl
2、在service_acl模块中引入依赖
注意:spring_security模块暂时没有创建,必须注掉
<dependencies>
<!--<dependency>
<groupId>com.nanjing</groupId>
<artifactId>spring_security</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
</dependencies>
3、创建权限管理相关的表(就是上面的5张表)
4、建包,写代码,都是通用代码直接拷贝过来
注意:UserDetailsServiceImpl必须删掉,因为里面用到spring_security模块中的类
5、编写application.properties配置文件
# 服务端口
server.port=8009
# 服务名
spring.application.name=service-acl
# mysql数据库连接
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/guli?serverTimezone=GMT%2B8
spring.datasource.username=root
spring.datasource.password=mysql
#返回json的全局时间格式
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8
spring.redis.host=127.0.0.1
sping.redis.port=6379
spring.redis.database= 0
spring.redis.timeout=1800000
spring.redis.lettuce.pool.max-active=20
spring.redis.lettuce.pool.max-wait=-1
#最大阻塞等待时间(负数表示没限制)
spring.redis.lettuce.pool.max-idle=5
spring.redis.lettuce.pool.min-idle=0
#最小空闲
#配置mapper xml文件的路径
mybatis-plus.mapper-locations=classpath:com/nanjing/aclservice/mapper/xml/*.xml
# nacos服务地址
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
#mybatis日志
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
注意:lettuce相关的全部要删掉
主启动类ServiceAclApplication
package com.nanjing.aclservice;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@EnableDiscoveryClient
@ComponentScan("com.nanjing")
@MapperScan("com.nanjing.aclservice.mapper")
public class ServiceAclApplication {
public static void main(String[] args) {
SpringApplication.run(ServiceAclApplication.class, args);
}
}
权限管理重点接口解析
(1)查询所有菜单-----递归
PermissionController类
//获取全部菜单
@ApiOperation(value = "查询所有菜单")
@GetMapping
public R indexAllPermission() {
List<Permission> list = permissionService.queryAllMenuGuli();
return R.ok().data("children",list);
}
//获取全部菜单
List<Permission> queryAllMenuGuli();
//========================递归查询所有菜单================================================
//获取全部菜单
@Override
public List<Permission> queryAllMenuGuli() {
//1 查询菜单表所有数据
QueryWrapper<Permission> wrapper = new QueryWrapper<>();
wrapper.orderByDesc("id");
List<Permission> permissionList = baseMapper.selectList(wrapper);
//2 把查询所有菜单list集合按照要求进行封装
List<Permission> resultList = bulidPermission(permissionList);
return resultList;
}
//把返回所有菜单list集合进行封装的方法
public static List<Permission> bulidPermission(List<Permission> permissionList) {
//创建list集合,用于数据最终封装
List<Permission> finalNode = new ArrayList<>();
//把所有菜单list集合遍历,得到顶层菜单 pid=0菜单,设置level是1
for(Permission permissionNode : permissionList) {
//得到顶层菜单 pid=0菜单
if("0".equals(permissionNode.getPid())) {
//设置顶层菜单的level是1
permissionNode.setLevel(1);
//根据顶层菜单,向里面进行查询子菜单,封装到finalNode里面
finalNode.add(selectChildren(permissionNode,permissionList));
}
}
return finalNode;
}
private static Permission selectChildren(Permission permissionNode, List<Permission> permissionList) {
//1 因为向一层菜单里面放二层菜单,二层里面还要放三层,把对象初始化
permissionNode.setChildren(new ArrayList<Permission>());
//2 遍历所有菜单list集合,进行判断比较,比较id和pid值是否相同
for(Permission it : permissionList) {
//判断 id和pid值是否相同
if(permissionNode.getId().equals(it.getPid())) {
//把父菜单的level值+1
int level = permissionNode.getLevel()+1;
it.setLevel(level);
//如果children为空,进行初始化操作
if(permissionNode.getChildren() == null) {
permissionNode.setChildren(new ArrayList<Permission>());
}
//把查询出来的子菜单放到父菜单里面
permissionNode.getChildren().add(selectChildren(it,permissionList));
}
}
return permissionNode;
}
package com.nanjing.aclservice.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* <p>
* 权限
* </p>
*
* @author testjava
* @since 2020-01-12
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("acl_permission")
@ApiModel(value="Permission对象", description="权限")
public class Permission implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "编号")
@TableId(value = "id", type = IdType.ID_WORKER_STR)
private String id;
@ApiModelProperty(value = "所属上级")
private String pid;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "类型(1:菜单,2:按钮)")
private Integer type;
@ApiModelProperty(value = "权限值")
private String permissionValue;
@ApiModelProperty(value = "访问路径")
private String path;
@ApiModelProperty(value = "组件路径")
private String component;
@ApiModelProperty(value = "图标")
private String icon;
@ApiModelProperty(value = "状态(0:禁止,1:正常)")
private Integer status;
@ApiModelProperty(value = "层级")
@TableField(exist = false)
private Integer level;
@ApiModelProperty(value = "下级")
@TableField(exist = false)
private List<Permission> children;
@ApiModelProperty(value = "是否选中")
@TableField(exist = false)
private boolean isSelect;
@ApiModelProperty(value = "逻辑删除 1(true)已删除, 0(false)未删除")
private Boolean isDeleted;
@ApiModelProperty(value = "创建时间")
private Date gmtCreate;
@ApiModelProperty(value = "更新时间")
private Date gmtModified;
}
测试:启动AclApplication报错,
解决办法:application.properties去掉多余的lettuce配置
还是报错,Nacos问题
感觉应该是nacos默认集群,要改成单机模式
可以用命令行startup.cmd -m standalone就能以单体方式启动服务
控制台有提示信息:
我代码是这样配置的
最好加上@Repository注解,但是我没加后来又不报错了
感觉三点要注意:
1、nacos默认集群,要改成单机模式
2、lettuce相关的全部要删掉
3、UserDetailsServiceImpl必须删掉
重新启动ServiceAclApplication
用swagger测试:
http://localhost:8009/swagger-ui.html
用postman测试:
{
"success": true,
"code": 20000,
"message": "成功",
"data": {
"children": [
{
"id": "1",
"pid": "0",
"name": "全部数据",
"type": 0,
"permissionValue": null,
"path": null,
"component": null,
"icon": null,
"status": null,
"level": 1,
"children": [
{
"id": "1195354076890370050",
"pid": "1",
"name": "订单管理",
"type": 1,
"permissionValue": null,
"path": "/order",
"component": "Layout",
"icon": null,
"status": null,
"level": 2,
"children": [
{
"id": "1195354153482555393",
"pid": "1195354076890370050",
"name": "订单列表",
"type": 1,
"permissionValue": null,
"path": "list",
"component": "/order/list",
"icon": null,
"status": null,
"level": 3,
"children": [
{
"id": "1195354315093282817",
"pid": "1195354153482555393",
"name": "查看",
"type": 2,
"permissionValue": "order.list",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:54:12",
"gmtModified": "2019-11-15 22:54:12",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:53:33",
"gmtModified": "2019-11-15 22:53:58",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:53:15",
"gmtModified": "2019-11-15 22:53:15",
"select": false
},
{
"id": "1195352547621965825",
"pid": "1",
"name": "CMS管理",
"type": 1,
"permissionValue": null,
"path": "/cms",
"component": "Layout",
"icon": null,
"status": null,
"level": 2,
"children": [
{
"id": "1195353513549205505",
"pid": "1195352547621965825",
"name": "Bander列表",
"type": 1,
"permissionValue": null,
"path": "banner/list",
"component": "/cms/banner/list",
"icon": null,
"status": null,
"level": 3,
"children": [
{
"id": "1195353672110673921",
"pid": "1195353513549205505",
"name": "删除",
"type": 2,
"permissionValue": "banner.remove",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:51:39",
"gmtModified": "2019-11-15 22:51:39",
"select": false
},
{
"id": "1195353051395624961",
"pid": "1195353513549205505",
"name": "修改",
"type": 2,
"permissionValue": "banner.update",
"path": "banner/update/:id",
"component": "/cms/banner/form",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:49:11",
"gmtModified": "2019-11-18 10:52:05",
"select": false
},
{
"id": "1195352909401657346",
"pid": "1195353513549205505",
"name": "添加",
"type": 2,
"permissionValue": "banner.add",
"path": "banner/add",
"component": "/cms/banner/form",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:48:37",
"gmtModified": "2019-11-18 10:52:10",
"select": false
},
{
"id": "1195352856645701633",
"pid": "1195353513549205505",
"name": "查看",
"type": 2,
"permissionValue": "banner.list",
"path": "",
"component": null,
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:48:24",
"gmtModified": "2019-11-15 22:48:24",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:51:01",
"gmtModified": "2019-11-18 10:51:29",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:47:11",
"gmtModified": "2019-11-18 10:51:46",
"select": false
},
{
"id": "1195351862889254913",
"pid": "1",
"name": "统计分析",
"type": 1,
"permissionValue": null,
"path": "/statistics/daily",
"component": "Layout",
"icon": null,
"status": null,
"level": 2,
"children": [
{
"id": "1195352054917074946",
"pid": "1195351862889254913",
"name": "统计图表",
"type": 1,
"permissionValue": null,
"path": "chart",
"component": "/statistics/daily/chart",
"icon": null,
"status": null,
"level": 3,
"children": [
{
"id": "1195352127734386690",
"pid": "1195352054917074946",
"name": "查看",
"type": 2,
"permissionValue": "daily.list",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:45:30",
"gmtModified": "2019-11-15 22:45:30",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:45:13",
"gmtModified": "2019-11-15 22:45:13",
"select": false
},
{
"id": "1195351968841568257",
"pid": "1195351862889254913",
"name": "生成统计",
"type": 1,
"permissionValue": null,
"path": "create",
"component": "/statistics/daily/create",
"icon": null,
"status": null,
"level": 3,
"children": [
{
"id": "1195352215768633346",
"pid": "1195351968841568257",
"name": "生成",
"type": 2,
"permissionValue": "daily.add",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:45:51",
"gmtModified": "2019-11-15 22:45:51",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:44:53",
"gmtModified": "2019-11-15 22:44:53",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:44:27",
"gmtModified": "2019-11-15 22:44:27",
"select": false
},
{
"id": "1195350831744782337",
"pid": "1",
"name": "课程管理",
"type": 1,
"permissionValue": null,
"path": "/edu/course",
"component": "Layout",
"icon": null,
"status": null,
"level": 2,
"children": [
{
"id": "1195351020463296513",
"pid": "1195350831744782337",
"name": "发布课程",
"type": 1,
"permissionValue": null,
"path": "info",
"component": "/edu/course/info",
"icon": null,
"status": null,
"level": 3,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:41:06",
"gmtModified": "2019-11-15 22:41:06",
"select": false
},
{
"id": "1195350919074385921",
"pid": "1195350831744782337",
"name": "课程列表",
"type": 1,
"permissionValue": null,
"path": "list",
"component": "/edu/course/list",
"icon": null,
"status": null,
"level": 3,
"children": [
{
"id": "1195351566221938690",
"pid": "1195350919074385921",
"name": "编辑课程大纲",
"type": 2,
"permissionValue": "chapter.update",
"path": "chapter/:id",
"component": "/edu/course/chapter",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:43:17",
"gmtModified": "2019-11-15 22:43:17",
"select": false
},
{
"id": "1195351326706208770",
"pid": "1195350919074385921",
"name": "编辑课程",
"type": 2,
"permissionValue": "course.update",
"path": "info/:id",
"component": "/edu/course/info",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:42:19",
"gmtModified": "2019-11-15 22:42:19",
"select": false
},
{
"id": "1195351159672246274",
"pid": "1195350919074385921",
"name": "完成发布",
"type": 2,
"permissionValue": "course.publish",
"path": "publish/:id",
"component": "/edu/course/publish",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:41:40",
"gmtModified": "2019-11-15 22:44:01",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:40:42",
"gmtModified": "2019-11-15 22:40:42",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:40:21",
"gmtModified": "2019-11-15 22:40:21",
"select": false
},
{
"id": "1195350299365969922",
"pid": "1",
"name": "课程分类",
"type": 1,
"permissionValue": null,
"path": "/edu/subject",
"component": "Layout",
"icon": null,
"status": null,
"level": 2,
"children": [
{
"id": "1195350500512206850",
"pid": "1195350299365969922",
"name": "导入课程分类",
"type": 1,
"permissionValue": null,
"path": "import",
"component": "/edu/subject/import",
"icon": null,
"status": null,
"level": 3,
"children": [
{
"id": "1195350687590748161",
"pid": "1195350500512206850",
"name": "导入",
"type": 2,
"permissionValue": "subject.import",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:39:47",
"gmtModified": "2019-11-15 22:39:47",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:39:03",
"gmtModified": "2019-11-15 22:39:03",
"select": false
},
{
"id": "1195350397751758850",
"pid": "1195350299365969922",
"name": "课程分类列表",
"type": 1,
"permissionValue": null,
"path": "list",
"component": "/edu/subject/list",
"icon": null,
"status": null,
"level": 3,
"children": [
{
"id": "1195350612172967938",
"pid": "1195350397751758850",
"name": "查看",
"type": 2,
"permissionValue": "subject.list",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:39:29",
"gmtModified": "2019-11-15 22:39:29",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:38:38",
"gmtModified": "2019-11-15 22:38:38",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:38:15",
"gmtModified": "2019-11-15 22:38:15",
"select": false
},
{
"id": "1195349439240048642",
"pid": "1",
"name": "讲师管理",
"type": 1,
"permissionValue": null,
"path": "/edu/teacher",
"component": "Layout",
"icon": null,
"status": null,
"level": 2,
"children": [
{
"id": "1195349810561781761",
"pid": "1195349439240048642",
"name": "添加讲师",
"type": 1,
"permissionValue": null,
"path": "create",
"component": "/edu/teacher/form",
"icon": null,
"status": null,
"level": 3,
"children": [
{
"id": "1195349876252971010",
"pid": "1195349810561781761",
"name": "添加",
"type": 2,
"permissionValue": "teacher.add",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:36:34",
"gmtModified": "2019-11-15 22:36:34",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:36:18",
"gmtModified": "2019-11-15 22:36:18",
"select": false
},
{
"id": "1195349699995734017",
"pid": "1195349439240048642",
"name": "讲师列表",
"type": 1,
"permissionValue": null,
"path": "list",
"component": "/edu/teacher/list",
"icon": null,
"status": null,
"level": 3,
"children": [
{
"id": "1195350188359520258",
"pid": "1195349699995734017",
"name": "删除",
"type": 2,
"permissionValue": "teacher.remove",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:37:48",
"gmtModified": "2019-11-15 22:37:48",
"select": false
},
{
"id": "1195350117270261762",
"pid": "1195349699995734017",
"name": "修改",
"type": 2,
"permissionValue": "teacher.update",
"path": "edit/:id",
"component": "/edu/teacher/form",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:37:31",
"gmtModified": "2019-11-15 22:37:31",
"select": false
},
{
"id": "1195349979797753857",
"pid": "1195349699995734017",
"name": "查看",
"type": 2,
"permissionValue": "teacher.list",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:36:58",
"gmtModified": "2019-11-15 22:36:58",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:35:52",
"gmtModified": "2019-11-15 22:35:52",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 22:34:49",
"gmtModified": "2019-11-15 22:34:49",
"select": false
},
{
"id": "1195268474480156673",
"pid": "1",
"name": "权限管理",
"type": 1,
"permissionValue": null,
"path": "/acl",
"component": "Layout",
"icon": null,
"status": null,
"level": 2,
"children": [
{
"id": "1195268893830864898",
"pid": "1195268474480156673",
"name": "菜单管理",
"type": 1,
"permissionValue": null,
"path": "menu/list",
"component": "/acl/menu/list",
"icon": null,
"status": null,
"level": 3,
"children": [
{
"id": "1195270887933009922",
"pid": "1195268893830864898",
"name": "删除",
"type": 2,
"permissionValue": "permission.remove",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:22:41",
"gmtModified": "2019-11-15 17:22:41",
"select": false
},
{
"id": "1195270862100291586",
"pid": "1195268893830864898",
"name": "修改",
"type": 2,
"permissionValue": "permission.update",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:22:35",
"gmtModified": "2019-11-15 17:22:35",
"select": false
},
{
"id": "1195270810560684034",
"pid": "1195268893830864898",
"name": "添加",
"type": 2,
"permissionValue": "permission.add",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:22:23",
"gmtModified": "2019-11-15 17:22:23",
"select": false
},
{
"id": "1195270744097742849",
"pid": "1195268893830864898",
"name": "查看",
"type": 2,
"permissionValue": "permission.list",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:22:07",
"gmtModified": "2019-11-15 17:22:07",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:14:46",
"gmtModified": "2019-11-15 17:14:46",
"select": false
},
{
"id": "1195268788138598401",
"pid": "1195268474480156673",
"name": "角色管理",
"type": 1,
"permissionValue": null,
"path": "role/list",
"component": "/acl/role/list",
"icon": null,
"status": null,
"level": 3,
"children": [
{
"id": "1195270621548568578",
"pid": "1195268788138598401",
"name": "角色权限",
"type": 2,
"permissionValue": "role.acl",
"path": "role/distribution/:id",
"component": "/acl/role/roleForm",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:21:38",
"gmtModified": "2019-11-15 17:21:38",
"select": false
},
{
"id": "1195270442602782721",
"pid": "1195268788138598401",
"name": "删除",
"type": 2,
"permissionValue": "role.remove",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:20:55",
"gmtModified": "2019-11-15 17:20:55",
"select": false
},
{
"id": "1195270037005197313",
"pid": "1195268788138598401",
"name": "添加",
"type": 2,
"permissionValue": "role.add",
"path": "role/add",
"component": "/acl/role/form",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:19:19",
"gmtModified": "2019-11-18 11:05:42",
"select": false
},
{
"id": "1195269903542444034",
"pid": "1195268788138598401",
"name": "查看",
"type": 2,
"permissionValue": "role.list",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:18:47",
"gmtModified": "2019-11-15 17:18:47",
"select": false
},
{
"id": "1195269821262782465",
"pid": "1195268788138598401",
"name": "修改",
"type": 2,
"permissionValue": "role.update",
"path": "role/update/:id",
"component": "/acl/role/form",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:18:27",
"gmtModified": "2019-11-15 17:19:53",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:14:21",
"gmtModified": "2019-11-15 17:14:21",
"select": false
},
{
"id": "1195268616021139457",
"pid": "1195268474480156673",
"name": "用户管理",
"type": 1,
"permissionValue": null,
"path": "user/list",
"component": "/acl/user/list",
"icon": null,
"status": null,
"level": 3,
"children": [
{
"id": "1196301740985311234",
"pid": "1195268616021139457",
"name": "分配角色",
"type": 2,
"permissionValue": "user.assgin",
"path": "user/role/:id",
"component": "/acl/user/roleForm",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-18 13:38:56",
"gmtModified": "2019-11-18 13:38:56",
"select": false
},
{
"id": "1195269547269873666",
"pid": "1195268616021139457",
"name": "删除",
"type": 2,
"permissionValue": "user.remove",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:17:22",
"gmtModified": "2019-11-15 17:17:22",
"select": false
},
{
"id": "1195269473479483394",
"pid": "1195268616021139457",
"name": "修改",
"type": 2,
"permissionValue": "user.update",
"path": "user/update/:id",
"component": "/acl/user/form",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:17:04",
"gmtModified": "2019-11-15 17:17:04",
"select": false
},
{
"id": "1195269295926206466",
"pid": "1195268616021139457",
"name": "添加",
"type": 2,
"permissionValue": "user.add",
"path": "user/add",
"component": "/acl/user/form",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:16:22",
"gmtModified": "2019-11-15 17:16:22",
"select": false
},
{
"id": "1195269143060602882",
"pid": "1195268616021139457",
"name": "查看",
"type": 2,
"permissionValue": "user.list",
"path": "",
"component": "",
"icon": null,
"status": null,
"level": 4,
"children": [],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:15:45",
"gmtModified": "2019-11-17 21:57:16",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:13:40",
"gmtModified": "2019-11-18 13:53:12",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:13:06",
"gmtModified": "2019-11-18 13:54:25",
"select": false
}
],
"isDeleted": false,
"gmtCreate": "2019-11-15 17:13:06",
"gmtModified": "2019-11-15 17:13:06",
"select": false
}
]
}
}