master
parent
ce5c492d7e
commit
2bdb69ccbc
|
@ -71,7 +71,10 @@ public class AuthServiceimpl implements AuthService{
|
|||
return Result.error("密码不能为空");
|
||||
}
|
||||
if (!vailPwd(loginRequest.getUserPwd())){
|
||||
return Result.error("密码格式错误");
|
||||
return Result.error("密码最少六位,包含一个大写字母和一个小写字母和一个数字和一个特殊字符");
|
||||
}
|
||||
if (vailPwd2(loginRequest.getUserPwd())){
|
||||
return Result.error("密码不能为空");
|
||||
}
|
||||
|
||||
String userKey = UUID.randomUUID().toString().replaceAll("-", "");
|
||||
|
@ -105,4 +108,9 @@ public class AuthServiceimpl implements AuthService{
|
|||
return compile.matcher(userPwd).matches();
|
||||
}
|
||||
|
||||
public Boolean vailPwd2(String userPwd){
|
||||
Pattern compile = Pattern.compile("^$");
|
||||
return compile.matcher(userPwd).matches();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue