From 6da61b5c860e7f3d6fb1a28a5d0fddc10306c7dc Mon Sep 17 00:00:00 2001 From: Dionys Date: Tue, 19 Mar 2024 15:22:45 +0800 Subject: [PATCH] =?UTF-8?q?fix=20bug=20=E5=A4=9A=E8=A7=92=E8=89=B2=20?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=9B=B4=E6=96=B0=E4=B8=AA=E4=BA=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pig4cloud/pig/admin/service/impl/SysUserServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/impl/SysUserServiceImpl.java b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/impl/SysUserServiceImpl.java index 2dbffbc0..edea42ca 100644 --- a/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/impl/SysUserServiceImpl.java +++ b/pig-upms/pig-upms-biz/src/main/java/com/pig4cloud/pig/admin/service/impl/SysUserServiceImpl.java @@ -204,7 +204,7 @@ public class SysUserServiceImpl extends ServiceImpl impl @Override @CacheEvict(value = CacheConstants.USER_DETAILS, key = "#userDto.username") public R updateUserInfo(UserDTO userDto) { - UserVO userVO = baseMapper.getUserVoByUsername(userDto.getUsername()); + UserVO userVO = baseMapper.getUserVoById(SecurityUtils.getUser().getId()); SysUser sysUser = new SysUser(); sysUser.setPhone(userDto.getPhone()); @@ -412,7 +412,7 @@ public class SysUserServiceImpl extends ServiceImpl impl @Override @CacheEvict(value = CacheConstants.USER_DETAILS, key = "#userDto.username") public R changePassword(UserDTO userDto) { - UserVO userVO = baseMapper.getUserVoByUsername(userDto.getUsername()); + UserVO userVO = baseMapper.getUserVoById(SecurityUtils.getUser().getId()); if (Objects.isNull(userVO)) { return R.failed("用户不存在"); }