Skip to content

Commit 684ae38

Browse files
🚔 1.4.0 用户角色权限部门
1 parent c2a1385 commit 684ae38

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

docs/db/mysql_spring_boot_plus.sql

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ CREATE TABLE `sys_department`
7777
`state` int(11) NOT NULL DEFAULT '1' COMMENT '状态,0:禁用,1:启用',
7878
`sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
7979
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
80-
`deleted` int(11) NOT NULL DEFAULT '0' COMMENT '逻辑删除,0:未删除,1:已删除',
8180
`version` int(11) NOT NULL DEFAULT '0' COMMENT '版本',
8281
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
8382
`update_time` timestamp NULL DEFAULT NULL COMMENT '修改时间',
@@ -90,9 +89,8 @@ CREATE TABLE `sys_department`
9089
-- ----------------------------
9190
-- Records of sys_department
9291
-- ----------------------------
93-
INSERT INTO sys_department (id, name, parent_id, state, sort, remark, deleted, version, create_time, update_time) VALUES (1, '管理部', null, 1, 0, null, 0, 0, '2019-10-25 09:46:49', null);
94-
INSERT INTO sys_department (id, name, parent_id, state, sort, remark, deleted, version, create_time, update_time) VALUES (2, '测试部', null, 1, 0, null, 0, 0, '2019-10-25 09:47:06', null);
95-
92+
INSERT INTO sys_department (id, name, parent_id, state, sort, remark, version, create_time, update_time) VALUES (1, '管理部', null, 1, 0, null, 0, '2019-10-25 09:46:49', null);
93+
INSERT INTO sys_department (id, name, parent_id, state, sort, remark, version, create_time, update_time) VALUES (2, '测试部', null, 1, 0, null, 0, '2019-10-25 09:47:06', null);
9694

9795
-- ----------------------------
9896
-- Table structure for sys_user
@@ -107,6 +105,7 @@ CREATE TABLE `sys_user`
107105
`salt` varchar(32) DEFAULT NULL COMMENT '盐值',
108106
`phone` varchar(20) NOT NULL COMMENT '手机号码',
109107
`gender` int(11) NOT NULL DEFAULT '1' COMMENT '性别,0:女,1:男,默认1',
108+
`head` varchar(200) null comment '头像',
110109
`remark` varchar(200) DEFAULT NULL COMMENT 'remark',
111110
`state` int(11) NOT NULL DEFAULT '1' COMMENT '状态,0:禁用,1:启用,2:锁定',
112111
`department_id` bigint(20) NOT NULL COMMENT '部门id',
@@ -141,7 +140,6 @@ CREATE TABLE `sys_role`
141140
`type` int(11) DEFAULT NULL COMMENT '角色类型',
142141
`state` int(11) NOT NULL DEFAULT '1' COMMENT '角色状态,0:禁用,1:启用',
143142
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
144-
`deleted` int(11) NOT NULL DEFAULT '0' COMMENT '逻辑删除,0:未删除,1:已删除',
145143
`version` int(11) NOT NULL DEFAULT '0' COMMENT '版本',
146144
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
147145
`update_time` timestamp NULL DEFAULT NULL COMMENT '修改时间',
@@ -176,7 +174,6 @@ CREATE TABLE `sys_permission`
176174
`state` int(11) NOT NULL DEFAULT '1' COMMENT '状态,0:禁用,1:启用',
177175
`sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
178176
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
179-
`deleted` int(11) NOT NULL DEFAULT '0' COMMENT '逻辑删除,0:未删除,1:已删除',
180177
`version` int(11) NOT NULL DEFAULT '0' COMMENT '版本',
181178
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
182179
`update_time` timestamp NULL DEFAULT NULL COMMENT '修改时间',
@@ -215,7 +212,6 @@ CREATE TABLE `sys_role_permission`
215212
`permission_id` bigint(20) NOT NULL COMMENT '权限id',
216213
`state` int(11) NOT NULL DEFAULT '1' COMMENT '状态,0:禁用,1:启用',
217214
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
218-
`deleted` int(11) NOT NULL DEFAULT '0' COMMENT '逻辑删除,0:未删除,1:已删除',
219215
`version` int(11) NOT NULL DEFAULT '0' COMMENT '版本',
220216
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
221217
`update_time` timestamp NULL DEFAULT NULL COMMENT '修改时间',

src/main/java/io/geekidea/springbootplus/system/service/impl/SysRoleServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public boolean deleteSysRole(Long id) throws Exception {
168168
if (isExistsUser) {
169169
throw new DaoException("该角色下还存在可用用户,不能删除");
170170
}
171-
// 角色逻辑删除
171+
// 角色真实删除
172172
boolean deleteRoleResult = removeById(id);
173173
if (!deleteRoleResult) {
174174
throw new DaoException("删除角色失败");

0 commit comments

Comments
 (0)