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