Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
Project
Project
Details
Activity
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
hubin
long-tern-care-service
Commits
8012a268
Commit
8012a268
authored
Mar 09, 2022
by
duanzhihong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查找
parent
98a45b08
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
SystemRole.java
.../java/com/hungraim/ltc/pojo/entity/system/SystemRole.java
+2
-1
RoleController.java
...va/com/hungraim/ltc/system/controller/RoleController.java
+2
-1
No files found.
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/system/SystemRole.java
View file @
8012a268
package
com
.
hungraim
.
ltc
.
pojo
.
entity
.
system
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
...
...
@@ -16,7 +17,7 @@ import java.util.Date;
@TableName
(
"LTC_ROLE"
)
public
class
SystemRole
{
@TableId
@TableId
(
type
=
IdType
.
AUTO
)
private
Long
roleId
;
private
String
roleName
;
private
String
status
;
...
...
system/system-admin-service/src/main/java/com/hungraim/ltc/system/controller/RoleController.java
View file @
8012a268
...
...
@@ -66,12 +66,13 @@ public class RoleController {
systemRole
.
setStatus
(
reqRoleInfo
.
getStatus
());
systemRole
.
setCreatedTime
(
new
Date
());
roleService
.
save
(
systemRole
);
Long
roleId
=
systemRole
.
getRoleId
();
if
(
reqRoleInfo
.
getResource
()
==
null
){
reqRoleInfo
.
setResource
(
new
ArrayList
<>());
}
List
<
SystemRoleResource
>
roleResources
=
reqRoleInfo
.
getResource
().
stream
().
map
(
resourceId
->
{
SystemRoleResource
systemRoleResource
=
new
SystemRoleResource
();
systemRoleResource
.
setRoleId
(
systemRole
.
getRoleId
()
);
systemRoleResource
.
setRoleId
(
roleId
);
systemRoleResource
.
setResourceId
(
resourceId
);
return
systemRoleResource
;
}).
collect
(
Collectors
.
toList
());
...
...
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