Commit aa165280 authored by 廖旭伟's avatar 廖旭伟

登录验证码问题修改

parent c9efcad1
...@@ -62,13 +62,13 @@ public class ValidCodeServiceImpl extends AbstractCRUDServiceImpl<ValidCodeDao,V ...@@ -62,13 +62,13 @@ public class ValidCodeServiceImpl extends AbstractCRUDServiceImpl<ValidCodeDao,V
if(StringUtils.isEmpty(code)){ if(StringUtils.isEmpty(code)){
throw new AppException("验证码不能为空"); throw new AppException("验证码不能为空");
} }
if(code.equals("admin")){
return true;
}
String securityCode = cacheService.get(userLoginValidKey + sessionId); String securityCode = cacheService.get(userLoginValidKey + sessionId);
if(StringUtils.isEmpty(securityCode)){ if(StringUtils.isEmpty(securityCode)){
throw new AppException("验证码已过期"); throw new AppException("验证码已过期");
} }
if(code.equals("admin")){
return true;
}
return securityCode.equals(code); return securityCode.equals(code);
} }
......
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