Commit 07a48dc0 authored by huyuchen's avatar huyuchen

菜单权限修改

parent 53a671c7
......@@ -68,7 +68,7 @@ public class SysUserPermissionController {
*/
@Operation(description = "新增用户权限表:hasPermission('permission_sysuserpermission_add')")
@SysLog("新增用户权限表")
@PostMapping
@PostMapping("/savePermission")
@PreAuthorize("@pms.hasPermission('permission_sysuserpermission_add')")
public R save(@RequestBody SysUserPermission sysUserPermission) {
return sysUserPermissionService.savePermission(sysUserPermission);
......@@ -77,15 +77,18 @@ public class SysUserPermissionController {
/**
* 修改新权限-用户权限表
*
* @param sysUserPermission 新权限-用户权限表
* @param sysUserPermissionList 用户权限表list
* @return R
*/
@Operation(description = "修改用户权限表:hasPermission('permission_sysuserpermission_edit')")
@SysLog("修改用户权限表")
@PutMapping
@PostMapping("/updatePermission")
@PreAuthorize("@pms.hasPermission('permission_sysuserpermission_edit')")
public R<Boolean> updateById(@RequestBody SysUserPermission sysUserPermission) {
return R.ok(sysUserPermissionService.updateById(sysUserPermission));
public R<Boolean> updateById(@RequestBody List<SysUserPermission> sysUserPermissionList) {
for (SysUserPermission permission : sysUserPermissionList) {
sysUserPermissionService.updateById(permission);
}
return R.ok();
}
/**
......
......@@ -191,7 +191,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
//查询权限类型字典
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()
.eq(SysUserInfo::getStatus, CommonConstants.ZERO_INT));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment