diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleServiceImpl.java index 0b614a9..0d6c7b0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/service/impl/RoleServiceImpl.java @@ -175,8 +175,8 @@ public class RoleServiceImpl extends ServiceImpl implements IR } private void saveRoleMenu(List menuIds, Long roleId) { + roleMenuService.remove(Wrappers.lambdaQuery(RoleMenu.class).eq(RoleMenu::getRoleId, roleId)); if (CollUtil.isNotEmpty(menuIds)) { - roleMenuService.remove(Wrappers.lambdaQuery(RoleMenu.class).eq(RoleMenu::getRoleId, roleId)); Set toAddMenus = new HashSet<>(); for (Long menuId : menuIds) { Menu menu = menuService.getById(menuId);