|
@@ -68,8 +68,10 @@ public class UpSoftAccountController { |
|
@@ -68,8 +68,10 @@ public class UpSoftAccountController { |
68
|
return new ResponseEntity<>(ResultModel.error(ResultStatus.USERNAME_OR_PASSWORD_ERROR), HttpStatus.OK);
|
68
|
return new ResponseEntity<>(ResultModel.error(ResultStatus.USERNAME_OR_PASSWORD_ERROR), HttpStatus.OK);
|
69
|
}
|
69
|
}
|
70
|
String salt = admin.getSalt();
|
70
|
String salt = admin.getSalt();
|
|
|
71
|
+ String adminType = Integer.toString(admin.getType());
|
|
|
72
|
+ String str = account + password + adminType + salt; // 构建待加密字符串
|
|
|
73
|
+ String calcuPass = SecurityTool.encode(SecurityTool.ALGORITHM_MD5, str);
|
71
|
String pass_in_db = admin.getPwd();
|
74
|
String pass_in_db = admin.getPwd();
|
72
|
- String calcuPass = SecurityTool.getPassword(account, password, salt);
|
|
|
73
|
if (!calcuPass.equals(pass_in_db) ||//密码错误
|
75
|
if (!calcuPass.equals(pass_in_db) ||//密码错误
|
74
|
admin.getStatus() != 1) {//用户无效
|
76
|
admin.getStatus() != 1) {//用户无效
|
75
|
//提示用户名或密码错误
|
77
|
//提示用户名或密码错误
|