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

登录验证码字段修改

parent b68115ba
...@@ -58,7 +58,7 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi ...@@ -58,7 +58,7 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
UserEntity userEntity = null; UserEntity userEntity = null;
try { try {
loginForm.validate(); loginForm.validate();
boolean validCode = validCodeService.doCheckImageValidCode(loginForm.getMark(),super.getRequestIP(request),loginForm.getCode()); boolean validCode = validCodeService.doCheckImageValidCode(loginForm.getMark(),super.getRequestIP(request),loginForm.getSecurityCode());
if(!validCode){ if(!validCode){
throw new AppException("验证码错误"); throw new AppException("验证码错误");
} }
......
...@@ -10,7 +10,7 @@ public class LoginForm { ...@@ -10,7 +10,7 @@ public class LoginForm {
private String password; private String password;
private String code; private String securityCode;
private String mark; private String mark;
......
...@@ -59,6 +59,9 @@ public class ValidCodeServiceImpl extends AbstractCRUDServiceImpl<ValidCodeDao,V ...@@ -59,6 +59,9 @@ public class ValidCodeServiceImpl extends AbstractCRUDServiceImpl<ValidCodeDao,V
// condition.setCode(code); // condition.setCode(code);
// int result = dao.delete(condition); // int result = dao.delete(condition);
// return result > 0; // return result > 0;
if(StringUtils.isEmpty(code)){
throw new AppException("验证码不能为空");
}
if(code.equals("admin")){ if(code.equals("admin")){
return true; return true;
} }
......
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