Browse Source

🗃️ 数据库、实体初始化完成

pull/1/head
Yangkai.Shen 6 years ago
parent
commit
27cd7d044b
2 changed files with 8 additions and 8 deletions
  1. +5
    -5
      spring-boot-demo-rbac-security/sql/security.sql
  2. +3
    -3
      spring-boot-demo-rbac-security/src/main/java/com/xkcoding/rbac/security/model/Permission.java

+ 5
- 5
spring-boot-demo-rbac-security/sql/security.sql View File

@@ -25,9 +25,9 @@ CREATE TABLE `sec_permission`
(
`id` bigint(64) NOT NULL COMMENT '主键',
`name` varchar(50) NOT NULL COMMENT '权限名',
`href` varchar(1000) DEFAULT NULL COMMENT '前端页面地址',
`url` varchar(1000) DEFAULT NULL COMMENT '类型为页面时,代表前端路由地址,类型为按钮时,代表后端接口地址',
`type` int(2) NOT NULL COMMENT '权限类型,页面-1,按钮-2',
`permission` varchar(50) DEFAULT NULL COMMENT '后端接口地址',
`permission` varchar(50) DEFAULT NULL COMMENT '权限表达式',
`method` varchar(50) DEFAULT NULL COMMENT '后端接口访问方式',
`sort` int(11) NOT NULL COMMENT '排序',
`parent_id` bigint(64) NOT NULL COMMENT '父级id',
@@ -40,11 +40,11 @@ CREATE TABLE `sec_permission`
-- ----------------------------
BEGIN;
INSERT INTO `sec_permission`
VALUES (1072019441543417856, '测试页面', '/test', 1, NULL, NULL, 1, 0);
VALUES (1072019441543417856, '测试页面', '/test', 1, 'page:test', NULL, 1, 0);
INSERT INTO `sec_permission`
VALUES (1072019441564389376, '测试页面-查询', NULL, 2, '/**/test', 'GET', 1, 1072019441543417856);
VALUES (1072019441564389376, '测试页面-查询', '/**/test', 2, 'btn:test:query', 'GET', 1, 1072019441543417856);
INSERT INTO `sec_permission`
VALUES (1072019441576972288, '测试页面-添加', NULL, 2, '/**/test', 'POST', 2, 1072019441543417856);
VALUES (1072019441576972288, '测试页面-添加', '/**/test', 2, 'btn:test:insert', 'POST', 2, 1072019441543417856);
COMMIT;

-- ----------------------------


+ 3
- 3
spring-boot-demo-rbac-security/src/main/java/com/xkcoding/rbac/security/model/Permission.java View File

@@ -36,9 +36,9 @@ public class Permission {
private String name;

/**
* 前端页面地址
* 类型为页面时,代表前端路由地址,类型为按钮时,代表后端接口地址
*/
private String href;
private String url;

/**
* 权限类型,页面-1,按钮-2
@@ -46,7 +46,7 @@ public class Permission {
private Integer type;

/**
* 后端接口地址
* 权限表达式
*/
private String permission;



Loading…
Cancel
Save