From 2069ccf15e44e28ad8579f4475440520bac01b87 Mon Sep 17 00:00:00 2001 From: abbfun <819589789@qq.com> Date: Tue, 29 Mar 2022 01:53:51 +0000 Subject: [PATCH] =?UTF-8?q?update=20ruoyi-admin/src/main/java/com/ruoyi/we?= =?UTF-8?q?b/controller/system/SysProfileController.java.=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AF=86=E7=A0=81=E6=97=A0=E6=B3=95=E5=AF=B9=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E8=B4=A6=E6=88=B7=E5=90=8C=E6=97=B6=E5=9C=A8=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E4=BD=8D=E7=BD=AE=E7=9A=84=E7=99=BB=E5=BD=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E8=BF=9B=E8=A1=8C=E6=9B=B4=E6=96=B0=EF=BC=88=E5=8F=AA?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9A=84=E5=BD=93=E5=89=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=AB=AF=E7=BC=93=E5=AD=98=EF=BC=89=EF=BC=8C=E9=87=87=E7=94=A8?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E7=94=A8=E6=88=B7=E7=9A=84=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E9=AA=8C=E8=AF=81=E5=AF=BC=E8=87=B4=E5=8F=A6?= =?UTF-8?q?=E4=B8=80=E4=BD=8D=E7=BD=AE=E7=99=BB=E5=BD=95=E7=9A=84=E8=BF=98?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E4=BD=BF=E7=94=A8=E6=97=A7=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AF=86=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../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 be515fd61..11ec30777 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 @@ -96,8 +96,9 @@ public class SysProfileController extends BaseController public AjaxResult updatePwd(String oldPassword, String newPassword) { LoginUser loginUser = getLoginUser(); - String userName = loginUser.getUsername(); - String password = loginUser.getPassword(); + SysUser user = userService.selectUserById(loginUser.getUserId()); + String userName = user.getUserName(); + String password = user.getPassword(); if (!SecurityUtils.matchesPassword(oldPassword, password)) { return AjaxResult.error("修改密码失败,旧密码错误");