From 700b441bbb8aa585f558c2160c00672d6aebc179 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: Wed, 15 Mar 2023 17:31:30 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=B8=8E=E5=B2=97=E4=BD=8D=E5=85=B3=E8=81=94?= =?UTF-8?q?=20id=E4=BD=BF=E7=94=A8=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/system/service/impl/SysUserServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 5c69b772..8e22a27d 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 @@ -416,10 +416,9 @@ public class SysUserServiceImpl implements ISysUserService, UserService { public void insertUserPost(SysUserBo user, boolean clear) { Long[] posts = user.getPostIds(); if (ArrayUtil.isNotEmpty(posts)) { - Long userId = LoginHelper.getUserId(); if (clear) { // 删除用户与岗位关联 - userPostMapper.delete(new LambdaQueryWrapper().eq(SysUserPost::getUserId, userId)); + userPostMapper.delete(new LambdaQueryWrapper().eq(SysUserPost::getUserId, user.getUserId())); } // 新增用户与岗位管理 List list = StreamUtils.toList(List.of(posts), postId -> {