贴表结构
用户表
CREATE TABLE `users` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`username` varchar(100) NOT NULL,
`fast` int(10) NOT NULL DEFAULT '0',
`loginname` varchar(100) NOT NULL,
`loginpass` varchar(100) DEFAULT NULL,
`importuserid` int(255) DEFAULT NULL COMMENT '创建人',
`importdate` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
)
角色表
CREATE TABLE `role` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`groupname` varchar(100) NOT NULL,
`fast` int(11) NOT NULL DEFAULT '0',
`importdate` datetime NOT NULL,
`importuserid` int(11) NOT NULL ,
PRIMARY KEY (`id`)
)
角色和用户关联表
CREATE TABLE `roleanduser` (
`groupid` int(11) NOT NULL,
`userid` int(11) NOT NULL
)
角色权限关联表
CREATE TABLE `roleandright` (
`groupid` int(10) NOT NULL,
`rightid` int(10) NOT NULL
)
权限表
CREATE TABLE `right` (
`id` int(10) NOT NULL,
`rightpath` varchar(200) NOT NULL,
`isShow` int(11) NOT NULL DEFAULT '0' COMMENT '1表示不显示0表示显示',
`importdate` datetime NOT NULL,
`importuserid` int(10) NOT NULL,
`coding` int(11) DEFAULT NULL,
`isLeaf` int(11) DEFAULT NULL,
`backinfo` varchar(1000) NOT NULL DEFAULT '' COMMENT '备注',
PRIMARY KEY (`id`)
)
个人感觉用spring的acegi还不如按照自己的表结构设计权限,完成脱离acegi的繁琐配置
!!!!!!!!!!!!!如有更好的建议,欢迎大家指正!!!!!!!!!!
用户表
CREATE TABLE `users` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`username` varchar(100) NOT NULL,
`fast` int(10) NOT NULL DEFAULT '0',
`loginname` varchar(100) NOT NULL,
`loginpass` varchar(100) DEFAULT NULL,
`importuserid` int(255) DEFAULT NULL COMMENT '创建人',
`importdate` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
)
角色表
CREATE TABLE `role` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`groupname` varchar(100) NOT NULL,
`fast` int(11) NOT NULL DEFAULT '0',
`importdate` datetime NOT NULL,
`importuserid` int(11) NOT NULL ,
PRIMARY KEY (`id`)
)
角色和用户关联表
CREATE TABLE `roleanduser` (
`groupid` int(11) NOT NULL,
`userid` int(11) NOT NULL
)
角色权限关联表
CREATE TABLE `roleandright` (
`groupid` int(10) NOT NULL,
`rightid` int(10) NOT NULL
)
权限表
CREATE TABLE `right` (
`id` int(10) NOT NULL,
`rightpath` varchar(200) NOT NULL,
`isShow` int(11) NOT NULL DEFAULT '0' COMMENT '1表示不显示0表示显示',
`importdate` datetime NOT NULL,
`importuserid` int(10) NOT NULL,
`coding` int(11) DEFAULT NULL,
`isLeaf` int(11) DEFAULT NULL,
`backinfo` varchar(1000) NOT NULL DEFAULT '' COMMENT '备注',
PRIMARY KEY (`id`)
)
个人感觉用spring的acegi还不如按照自己的表结构设计权限,完成脱离acegi的繁琐配置
!!!!!!!!!!!!!如有更好的建议,欢迎大家指正!!!!!!!!!!