|
@@ -384,4 +384,15 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
|
|
}
|
|
|
return userRoleMapper.batchUserRole(list);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void editRoleMenu(SysRole role) {
|
|
|
+ // 删除角色与菜单关联
|
|
|
+ roleMenuMapper.deleteRoleMenuByRoleId(role.getRoleId());
|
|
|
+ int num = insertRoleMenu(role);
|
|
|
+ if (num == 0) {
|
|
|
+ throw new ServiceException("修改角色'" + role.getRoleName() + "'失败,请联系管理员");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|