基于SpringSecurity+Guns规范前端+部分LayerAdmin设计的后台管理系统
1. RBAC模型的权限控制
CREATE TABLE t_sys_menu( id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT COMMENT "主键", parent INT UNSIGNED NOT NULL COMMENT "父级菜单id", `name` VARCHAR(200) NOT NULL COMMENT "菜单名称", icon VARCHAR(200) COMMENT "图标", path VARCHAR(200) NOT NULL COMMENT "路径", weight INT UNSIGNED NOT NULL DEFAULT 0 COMMENT "权重", `status` TINYINT UNSIGNED NOT NULL COMMENT "状态:1启用,0隐藏", is_menu TINYINT UNSIGNED NOT NULL COMMENT "是否菜单:1是,0否", tips VARCHAR(500) COMMENT "备注", create_time TIMESTAMP NOT NULL DEFAULT NOW() COMMENT "创建时间", last_update_time TIMESTAMP NOT NULL DEFAULT NOW() COMMENT "最后修改时间", UNIQUE unq_name(`name`), INDEX idx_parent(parent), INDEX idx_status(`status`), INDEX idx_is_menu(is_menu) ) COMMENT = "系统菜单表"; CREATE TABLE t_sys_role( id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT COMMENT "主键", parent INT UNSIGNED NOT NULL COMMENT "父级菜单id", `name` VARCHAR(200) NOT NULL COMMENT "角色名称", `status` TINYINT UNSIGNED NOT NULL COMMENT "状态:1启用,0隐藏", create_time TIMESTAMP NOT NULL DEFAULT NOW() COMMENT "创建时间", last_update_time TIMESTAMP NOT NULL DEFAULT NOW() COMMENT "最后修改时间", UNIQUE unq_name(`name`), INDEX idx_parent(parent), INDEX idx_status(`status`) ) COMMENT = "系统角色表"; CREATE TABLE t_sys_role_menu( role_id INT UNSIGNED COMMENT "角色ID", menu_id INT UNSIGNED COMMENT "菜单ID", PRIMARY KEY(role_id, menu_id) ) COMMENT = "角色与菜单关联表"; CREATE TABLE t_sys_user( id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT COMMENT "主键", username VARCHAR(200) NOT NULL COMMENT "用户名", `password` VARCHAR(2000) NOT NULL COMMENT "密码", avatar VARCHAR(2000) NULL COMMENT "用户头像", role_id INT UNSIGNED NOT NULL COMMENT "角色ID", `status` TINYINT UNSIGNED NOT NULL COMMENT "状态: 1可用,2禁用", create_time TIMESTAMP NOT NULL DEFAULT NOW() COMMENT "添加时间", last_update_time TIMESTAMP NOT NULL DEFAULT NOW() COMMENT "最后修改时间", UNIQUE unq_username(username), INDEX idx_username(username), INDEX idx_emp_id(emp_id), INDEX idx_role_id(role_id), INDEX idx_status(`status`) ) COMMENT = "系统用户表";
2. Bootstrap表格的屏幕自适应
点击查看更多内容
1人点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦