瀏覽代碼

Update UserController.java

修复修改密码报错,传递id参数为0的bug
逐浪人 2 年之前
父節點
當前提交
ccbef9b533
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/main/java/com/genersoft/iot/vmp/vmanager/user/UserController.java

+ 2 - 2
src/main/java/com/genersoft/iot/vmp/vmanager/user/UserController.java

@@ -83,8 +83,8 @@ public class UserController {
             if (user == null) {
                 throw new ControllerException(ErrorCode.ERROR100);
             }
-            int userId = SecurityUtils.getUserId();
-            boolean result = userService.changePassword(userId, DigestUtils.md5DigestAsHex(password.getBytes()));
+            //int userId = SecurityUtils.getUserId();
+            boolean result = userService.changePassword(user.getId(), DigestUtils.md5DigestAsHex(password.getBytes()));
             if (!result) {
                 throw new ControllerException(ErrorCode.ERROR100);
             }