Commit 18b1f519 by 吴迪

【修改】密码问题

parent fbad6b10
...@@ -340,16 +340,17 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl ...@@ -340,16 +340,17 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
public boolean checkPassWord(String passWord) { public boolean checkPassWord(String passWord) {
String t1 = "^[0-9A-Za-z]{2,8}$"; //判断密码用户名和密码是否为数字,字母(数字或字母) String t1 = "^[0-9A-Za-z]{2,8}$"; //判断密码用户名和密码是否为数字,字母(数字或字母)
String t2 = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{5,12}$";//(数字和字母) String t2 = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{5,12}$";//(数字和字母)
if (passWord.matches(t2)) { String t3 = "^(?=.*[a-zA-Z])(?=.*[0-9!@#$%^&*()_+=-])[a-zA-Z0-9!@#$%^&*()_+=-]{8,20}$";
return passWord.matches(t2); String regex = "^(?=.*[a-z])(?=.*[A-Z0-9!@#$%^&*()_+=-])|(?=.*[A-Z])(?=.*[a-z0-9!@#$%^&*()_+=-])|(?=.*[0-9])(?=.*[a-zA-Z!@#$%^&*()_+=-])|(?=.*[!@#$%^&*()_+=-])(?=.*[a-zA-Z0-9])[a-zA-Z0-9!@#$%^&*()_+=-]{8,20}$";
} else { return passWord.matches(regex);
//System.out.println("用户名只能是数字加字母,长度2-8位");
return false;
}
} }
@Override @Override
public String getVerificationCode(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response) { public String getVerificationCode(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response) {
//验证码随机6位数字(验证码) //验证码随机6位数字(验证码)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment