...
|
...
|
@@ -47,11 +47,9 @@ public class LoginServiceImpl implements ILoginService{ |
|
|
return null;
|
|
|
}else{
|
|
|
String salt = admin.getSalt();
|
|
|
String adminType = Integer.toString(admin.getType());
|
|
|
String str = admin.getAccount() + password + adminType + salt; // 构建待加密字符串
|
|
|
String calcuPass = SecurityTool.encode(SecurityTool.ALGORITHM_MD5, str);
|
|
|
String pass_in_db = admin.getPwd();
|
|
|
if (!calcuPass.equals(pass_in_db))//密码错误
|
|
|
String pass = SecurityTool.getPassword(username, password, salt);
|
|
|
if (!pass.equals(pass_in_db))//密码错误
|
|
|
return null;
|
|
|
}
|
|
|
return admin;
|
...
|
...
|
|