Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EL-ADMIN
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
JiangSN
EL-ADMIN
Commits
f40c2dc7
Commit
f40c2dc7
authored
Oct 13, 2021
by
JiangSN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复角色管理页面报错
parent
593ee9ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
Role.java
...src/main/java/me/zhengjie/modules/system/domain/Role.java
+1
-1
RoleController.java
.../java/me/zhengjie/modules/system/rest/RoleController.java
+2
-2
RoleServiceImpl.java
...zhengjie/modules/system/service/impl/RoleServiceImpl.java
+1
-1
No files found.
eladmin/eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Role.java
View file @
f40c2dc7
...
@@ -76,7 +76,7 @@ public class Role extends BaseEntity implements Serializable {
...
@@ -76,7 +76,7 @@ public class Role extends BaseEntity implements Serializable {
@Column
(
name
=
"role_level"
)
@Column
(
name
=
"role_level"
)
@ApiModelProperty
(
value
=
"级别,数值越小,级别越大"
)
@ApiModelProperty
(
value
=
"级别,数值越小,级别越大"
)
private
Integer
role_
level
=
3
;
private
Integer
level
=
3
;
@ApiModelProperty
(
value
=
"描述"
)
@ApiModelProperty
(
value
=
"描述"
)
private
String
description
;
private
String
description
;
...
...
eladmin/eladmin-system/src/main/java/me/zhengjie/modules/system/rest/RoleController.java
View file @
f40c2dc7
...
@@ -97,7 +97,7 @@ public class RoleController {
...
@@ -97,7 +97,7 @@ public class RoleController {
if
(
resources
.
getId
()
!=
null
)
{
if
(
resources
.
getId
()
!=
null
)
{
throw
new
BadRequestException
(
"A new "
+
ENTITY_NAME
+
" cannot already have an ID"
);
throw
new
BadRequestException
(
"A new "
+
ENTITY_NAME
+
" cannot already have an ID"
);
}
}
getLevels
(
resources
.
get
Role_l
evel
());
getLevels
(
resources
.
get
L
evel
());
roleService
.
create
(
resources
);
roleService
.
create
(
resources
);
return
new
ResponseEntity
<>(
HttpStatus
.
CREATED
);
return
new
ResponseEntity
<>(
HttpStatus
.
CREATED
);
}
}
...
@@ -107,7 +107,7 @@ public class RoleController {
...
@@ -107,7 +107,7 @@ public class RoleController {
@PutMapping
@PutMapping
@PreAuthorize
(
"@el.check('roles:edit')"
)
@PreAuthorize
(
"@el.check('roles:edit')"
)
public
ResponseEntity
<
Object
>
update
(
@Validated
(
Role
.
Update
.
class
)
@RequestBody
Role
resources
)
{
public
ResponseEntity
<
Object
>
update
(
@Validated
(
Role
.
Update
.
class
)
@RequestBody
Role
resources
)
{
getLevels
(
resources
.
get
Role_l
evel
());
getLevels
(
resources
.
get
L
evel
());
roleService
.
update
(
resources
);
roleService
.
update
(
resources
);
return
new
ResponseEntity
<>(
HttpStatus
.
NO_CONTENT
);
return
new
ResponseEntity
<>(
HttpStatus
.
NO_CONTENT
);
}
}
...
...
eladmin/eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/RoleServiceImpl.java
View file @
f40c2dc7
...
@@ -114,7 +114,7 @@ public class RoleServiceImpl implements RoleService {
...
@@ -114,7 +114,7 @@ public class RoleServiceImpl implements RoleService {
role
.
setDescription
(
resources
.
getDescription
());
role
.
setDescription
(
resources
.
getDescription
());
role
.
setDataScope
(
resources
.
getDataScope
());
role
.
setDataScope
(
resources
.
getDataScope
());
role
.
setDepts
(
resources
.
getDepts
());
role
.
setDepts
(
resources
.
getDepts
());
role
.
set
Role_level
(
resources
.
getRole_l
evel
());
role
.
set
Level
(
resources
.
getL
evel
());
roleRepository
.
save
(
role
);
roleRepository
.
save
(
role
);
// 更新相关缓存
// 更新相关缓存
delCaches
(
role
.
getId
(),
null
);
delCaches
(
role
.
getId
(),
null
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment