From fbab383bd78e9ca1bd84e5a158d5833e5888f5ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=88=A9?= Date: Thu, 2 Nov 2023 02:57:04 +0000 Subject: [PATCH] =?UTF-8?q?update=20ruoyi-admin/src/main/java/com/ruoyi/we?= =?UTF-8?q?b/controller/system/SysProfileController.java.=20=E6=AD=A4?= =?UTF-8?q?=E5=A4=84=E6=96=B0=E5=AF=86=E7=A0=81=E5=8A=A0=E5=AF=86=E4=BA=86?= =?UTF-8?q?=E4=B8=A4=E6=AC=A1=EF=BC=8C=E5=A4=9A=E4=BD=99=E7=9A=84=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=EF=BC=8C=E4=B8=94=E4=BC=9A=E5=AF=BC=E8=87=B4=E6=96=B0?= =?UTF-8?q?=E7=94=9F=E6=88=90=E7=9A=84=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E4=B8=8E=E7=BC=93=E5=AD=98=E4=B8=AD=E7=9A=84=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E4=B8=8D=E5=90=8C=EF=BC=8C=E5=A6=82=E6=9E=9C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=9A=84=E4=B8=8D=E5=AF=B9=E8=BF=98=E8=AF=B7=E8=AE=B2?= =?UTF-8?q?=E8=A7=A3=E5=9B=9E=E5=A4=8D=E4=B8=8B=EF=BC=8C=E8=B0=A2=E8=B0=A2?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 张利 --- .../ruoyi/web/controller/system/SysProfileController.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java index 94c471e7..2d7f42f9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java @@ -100,10 +100,11 @@ public class SysProfileController extends BaseController { return error("新密码不能与旧密码相同"); } - if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0) + newPassword = SecurityUtils.encryptPassword(newPassword); + if (userService.resetUserPwd(userName, newPassword) > 0) { // 更新缓存用户密码 - loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword)); + loginUser.getUser().setPassword(newPassword); tokenService.setLoginUser(loginUser); return success(); }