Commit 3fd60f86761662d0d8b34a6c89212b86157475db

Authored by 逐浪人
Committed by 648540858
1 parent 0f3f3c07

Update UserController.java

修复修改密码报错,传递id参数为0的bug
src/main/java/com/genersoft/iot/vmp/vmanager/user/UserController.java
@@ -83,8 +83,8 @@ public class UserController { @@ -83,8 +83,8 @@ public class UserController {
83 if (user == null) { 83 if (user == null) {
84 throw new ControllerException(ErrorCode.ERROR100); 84 throw new ControllerException(ErrorCode.ERROR100);
85 } 85 }
86 - int userId = SecurityUtils.getUserId();  
87 - boolean result = userService.changePassword(userId, DigestUtils.md5DigestAsHex(password.getBytes())); 86 + //int userId = SecurityUtils.getUserId();
  87 + boolean result = userService.changePassword(user.getId(), DigestUtils.md5DigestAsHex(password.getBytes()));
88 if (!result) { 88 if (!result) {
89 throw new ControllerException(ErrorCode.ERROR100); 89 throw new ControllerException(ErrorCode.ERROR100);
90 } 90 }