|
|
|
@ -120,7 +120,12 @@ public class MyAuthenticationProvider implements AuthenticationProvider {
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//判断手机号与企业编码是否存在
|
|
|
|
|
if(!"admin".equals(loginname) && userTokenService.listCount(agentcode,loginname).intValue() <= 0){
|
|
|
|
|
// if(!"admin".equals(loginname) && userTokenService.listCount(agentcode,loginname).intValue() <= 0){
|
|
|
|
|
// throw new AuthenticationServiceException("企业编码错误!");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//企业编码是否存在
|
|
|
|
|
if(!"admin".equals(loginname) && userTokenService.listOthernoCount(agentcode).intValue() <= 0){
|
|
|
|
|
throw new AuthenticationServiceException("企业编码错误!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -128,7 +133,9 @@ public class MyAuthenticationProvider implements AuthenticationProvider {
|
|
|
|
|
if (!tenantStatus) {
|
|
|
|
|
throw new AuthenticationServiceException("该租户已被冻结!");
|
|
|
|
|
}
|
|
|
|
|
if(!"admin".equals(loginname) && userTokenService.listCount(agentcode,loginname).intValue() <= 0){
|
|
|
|
|
|
|
|
|
|
//判断账号是否存在
|
|
|
|
|
if(!"admin".equals(loginname) && userTokenService.listLoginNameCount(agentcode,loginname).intValue() <= 0){
|
|
|
|
|
throw new AuthenticationServiceException("账号不存在!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -179,7 +186,7 @@ public class MyAuthenticationProvider implements AuthenticationProvider {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//userTokenService.savePasswordMaxRetry(user.getLoginname());
|
|
|
|
|
throw new AuthenticationServiceException("账号密码不正确");
|
|
|
|
|
throw new AuthenticationServiceException("密码错误");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|