From 56d9c3ff362af4342ba934e34f46f63209b9e1e3 Mon Sep 17 00:00:00 2001 From: vchao Date: Tue, 12 Dec 2023 10:05:14 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BF=AE=E6=94=B9=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B0=B4=E5=B9=B3=E8=B6=8A=E6=9D=83=E6=BC=8F?= =?UTF-8?q?=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/modular/user/service/impl/SysUserServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/snowy-plugin/snowy-plugin-sys/src/main/java/vip/xiaonuo/sys/modular/user/service/impl/SysUserServiceImpl.java b/snowy-plugin/snowy-plugin-sys/src/main/java/vip/xiaonuo/sys/modular/user/service/impl/SysUserServiceImpl.java index f879079d..a2d691be 100644 --- a/snowy-plugin/snowy-plugin-sys/src/main/java/vip/xiaonuo/sys/modular/user/service/impl/SysUserServiceImpl.java +++ b/snowy-plugin/snowy-plugin-sys/src/main/java/vip/xiaonuo/sys/modular/user/service/impl/SysUserServiceImpl.java @@ -61,6 +61,7 @@ import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; +import vip.xiaonuo.auth.core.util.StpLoginUserUtil; import vip.xiaonuo.common.cache.CommonCacheOperator; import vip.xiaonuo.common.enums.CommonSortOrderEnum; import vip.xiaonuo.common.excel.CommonExcelCustomMergeStrategy; @@ -837,6 +838,11 @@ public class SysUserServiceImpl extends ServiceImpl impl @Override public void updateUserInfo(SysUserUpdateInfoParam sysUserUpdateInfoParam) { + String id = StpLoginUserUtil.getLoginUser().getId(); + if (!StrUtil.equals(id,sysUserUpdateInfoParam.getId())){ + throw new CommonException("禁止修改他人信息"); + } + SysUser sysUser = this.queryEntity(sysUserUpdateInfoParam.getId()); if (ObjectUtil.isNotEmpty(sysUserUpdateInfoParam.getPhone())) {