登录报错修改

This commit is contained in:
MAC 2022-05-16 01:35:43 +00:00 committed by Gitee
parent 7b69ca71be
commit c33262a34a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -69,12 +69,7 @@ public class UserController {
@Parameter(description = "登录密码") String password){
RestResult<UserLoginVo> restResult = new RestResult<UserLoginVo>();
String salt = userService.getSaltByTelephone(telephone);
// String hashPassword = new SimpleHash("MD5", password, salt, 1024).toHex();
String hashPassword = password + salt;
for (int i = 0; i < 1024; i++) {
hashPassword = DigestUtils.md5Hex(hashPassword);
}
String hashPassword = new SimpleHash("MD5", password, salt, 1024).toHex();
UserBean result = userService.selectUserByTelephoneAndPassword(telephone, hashPassword);
if (result == null) {
return RestResult.fail().message("手机号或密码错误!");