From 1ac98f522f498e394f23fea5c1079957f1d831cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Fri, 17 Feb 2023 16:46:24 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=B8=8E=E8=A7=92=E8=89=B2=E6=96=B0=E5=A2=9E=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=20id=20=E6=9C=AA=E4=BC=A0=E9=80=92=E7=BB=99=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java | 1 + .../java/com/ruoyi/system/service/impl/SysUserServiceImpl.java | 1 + 2 files changed, 2 insertions(+) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java index a04f81fe..1e1a8d76 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java @@ -234,6 +234,7 @@ public class SysRoleServiceImpl implements ISysRoleService { SysRole role = BeanUtil.toBean(bo, SysRole.class); // 新增角色信息 baseMapper.insert(role); + bo.setRoleId(role.getRoleId()); return insertRoleMenu(bo); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java index 1628d5fc..a503a980 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java @@ -284,6 +284,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService { SysUser sysUser = BeanUtil.copyProperties(user, SysUser.class); // 新增用户信息 int rows = baseMapper.insert(sysUser); + user.setUserId(sysUser.getUserId()); // 新增用户岗位关联 insertUserPost(user); // 新增用户与角色管理