Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
07a48dc0
Commit
07a48dc0
authored
Sep 08, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单权限修改
parent
53a671c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
SysUserPermissionController.java
...v1/permission/controller/SysUserPermissionController.java
+8
-5
SysUserPermissionServiceImpl.java
...permission/service/impl/SysUserPermissionServiceImpl.java
+1
-1
No files found.
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/controller/SysUserPermissionController.java
View file @
07a48dc0
...
@@ -68,7 +68,7 @@ public class SysUserPermissionController {
...
@@ -68,7 +68,7 @@ public class SysUserPermissionController {
*/
*/
@Operation
(
description
=
"新增用户权限表:hasPermission('permission_sysuserpermission_add')"
)
@Operation
(
description
=
"新增用户权限表:hasPermission('permission_sysuserpermission_add')"
)
@SysLog
(
"新增用户权限表"
)
@SysLog
(
"新增用户权限表"
)
@PostMapping
@PostMapping
(
"/savePermission"
)
@PreAuthorize
(
"@pms.hasPermission('permission_sysuserpermission_add')"
)
@PreAuthorize
(
"@pms.hasPermission('permission_sysuserpermission_add')"
)
public
R
save
(
@RequestBody
SysUserPermission
sysUserPermission
)
{
public
R
save
(
@RequestBody
SysUserPermission
sysUserPermission
)
{
return
sysUserPermissionService
.
savePermission
(
sysUserPermission
);
return
sysUserPermissionService
.
savePermission
(
sysUserPermission
);
...
@@ -77,15 +77,18 @@ public class SysUserPermissionController {
...
@@ -77,15 +77,18 @@ public class SysUserPermissionController {
/**
/**
* 修改新权限-用户权限表
* 修改新权限-用户权限表
*
*
* @param sysUserPermission
新权限-用户权限表
* @param sysUserPermission
List 用户权限表list
* @return R
* @return R
*/
*/
@Operation
(
description
=
"修改用户权限表:hasPermission('permission_sysuserpermission_edit')"
)
@Operation
(
description
=
"修改用户权限表:hasPermission('permission_sysuserpermission_edit')"
)
@SysLog
(
"修改用户权限表"
)
@SysLog
(
"修改用户权限表"
)
@P
utMapping
@P
ostMapping
(
"/updatePermission"
)
@PreAuthorize
(
"@pms.hasPermission('permission_sysuserpermission_edit')"
)
@PreAuthorize
(
"@pms.hasPermission('permission_sysuserpermission_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
SysUserPermission
sysUserPermission
)
{
public
R
<
Boolean
>
updateById
(
@RequestBody
List
<
SysUserPermission
>
sysUserPermissionList
)
{
return
R
.
ok
(
sysUserPermissionService
.
updateById
(
sysUserPermission
));
for
(
SysUserPermission
permission
:
sysUserPermissionList
)
{
sysUserPermissionService
.
updateById
(
permission
);
}
return
R
.
ok
();
}
}
/**
/**
...
...
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/service/impl/SysUserPermissionServiceImpl.java
View file @
07a48dc0
...
@@ -191,7 +191,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
...
@@ -191,7 +191,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
//查询权限类型字典
//查询权限类型字典
List
<
SysDictVo
>
typeList
=
baseMapper
.
selectDictByType
(
"permission"
);
List
<
SysDictVo
>
typeList
=
baseMapper
.
selectDictByType
(
"permission"
);
Map
<
String
,
String
>
typeMap
=
typeList
.
stream
().
collect
(
Collectors
.
toMap
(
SysDictVo:
:
getName
,
SysDictVo:
:
getId
));
Map
<
String
,
String
>
typeMap
=
typeList
.
stream
().
collect
(
Collectors
.
toMap
(
SysDictVo:
:
getName
,
SysDictVo:
:
getId
));
//查询所有用户的信息
//查询所有用户的信息
List
<
SysUserInfo
>
userInfoList
=
userInfoService
.
list
(
Wrappers
.<
SysUserInfo
>
query
().
lambda
()
List
<
SysUserInfo
>
userInfoList
=
userInfoService
.
list
(
Wrappers
.<
SysUserInfo
>
query
().
lambda
()
.
eq
(
SysUserInfo:
:
getStatus
,
CommonConstants
.
ZERO_INT
));
.
eq
(
SysUserInfo:
:
getStatus
,
CommonConstants
.
ZERO_INT
));
...
...
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