Commit 5e61d19f by java-李谡

更改登陆验证方式,添加用户类型6(测试账户类型),测试账号验证走数据库,不走首航登陆验证

parent ded89915
...@@ -152,7 +152,7 @@ public class UserController { ...@@ -152,7 +152,7 @@ public class UserController {
long duration = endTime - startTime; long duration = endTime - startTime;
LOG.debug("[UserController login][STATUS_CODE_4101]总共用时:"+Util.getDurationTime(duration)); LOG.debug("[UserController login][STATUS_CODE_4101]总共用时:"+Util.getDurationTime(duration));
return responseBean; return responseBean;
} else if (!"2".equals(userEntity.getUserType()) && !"4".equals(userEntity.getUserType())) { //不是内部联系人 通讯录联系人不允许登陆 } else if (!"2".equals(userEntity.getUserType()) && !"4".equals(userEntity.getUserType()) && !"6".equals(userEntity.getUserType())) { //不是内部联系人 通讯录联系人不允许登陆
responseBean.setStatus(ErrorCode.STATUS_CODE_4101); responseBean.setStatus(ErrorCode.STATUS_CODE_4101);
responseBean.setMessage("当前用户类型不允许登陆,请联系系统管理员"); responseBean.setMessage("当前用户类型不允许登陆,请联系系统管理员");
...@@ -163,7 +163,8 @@ public class UserController { ...@@ -163,7 +163,8 @@ public class UserController {
} }
boolean passwordError = false; boolean passwordError = false;
//只开放几个测试账号密码验证走数据库,其他的通过首航接口去验证 //只开放几个测试账号密码验证走数据库,其他的通过首航接口去验证
if((loginBean.getLoginName().equals("hwss1") || loginBean.getLoginName().equals("hwss2") || loginBean.getLoginName().equals("tianyz") || loginBean.getLoginName().equals("wangzl") || loginBean.getLoginName().equals("wtfk1") || loginBean.getLoginName().equals("test001") || loginBean.getLoginName().equals("test002"))){ // if((loginBean.getLoginName().equals("hwss1") || loginBean.getLoginName().equals("hwss2") || loginBean.getLoginName().equals("tianyz") || loginBean.getLoginName().equals("wangzl") || loginBean.getLoginName().equals("wtfk1") || loginBean.getLoginName().equals("test001") || loginBean.getLoginName().equals("test002"))){
if("6".equals(userEntity.getUserType())){
if(!Util.validatePassword(loginBean.getPassword(), userEntity.getPassword())){ if(!Util.validatePassword(loginBean.getPassword(), userEntity.getPassword())){
passwordError = true; passwordError = 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