Browse Source

日志4 - match22222123123123

dev
jianjun 3 years ago
parent
commit
2188e14a4a
  1. 25
      epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java

25
epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java

@ -644,20 +644,18 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
boolean havePasswordFlag=false; boolean havePasswordFlag=false;
//密码是否正确 //密码是否正确
boolean passwordRightFlag=false; boolean passwordRightFlag=false;
for (CustomerStaffDTO customerStaffDTO : customerStaffList) { CustomerStaffDTO customerStaffDTO = customerStaffList.get(0);
if(StringUtils.isNotBlank(customerStaffDTO.getPassword())){
havePasswordFlag=true; if (StringUtils.isNotBlank(customerStaffDTO.getPassword())) {
}else{ havePasswordFlag = true;
logger.warn(String.format("当前用户:账户%s,客户Id%s下未设置密码.",formDTO.getUserAccount(),customerStaffDTO.getCustomerId()));
continue;
}
long start2 = System.currentTimeMillis();
if (PasswordUtils.matches(formDTO.getPassword(), customerStaffDTO.getPassword())) {
passwordRightFlag=true;
customerIdList.add(customerStaffDTO.getCustomerId());
}
logger.info("getMyOrgByAccountService PasswordUtils.matches cost:{}",System.currentTimeMillis()-start2);
} }
long start2 = System.currentTimeMillis();
if (PasswordUtils.matches(formDTO.getPassword(), customerStaffDTO.getPassword())) {
passwordRightFlag = true;
customerIdList.add(customerStaffDTO.getCustomerId());
}
logger.info("getMyOrgByAccountService PasswordUtils.matches cost:{}", System.currentTimeMillis() - start2);
//根据手机号查出来所有用户,密码都为空,表明用户未激活账户,未设置密码 //根据手机号查出来所有用户,密码都为空,表明用户未激活账户,未设置密码
if(!havePasswordFlag){ if(!havePasswordFlag){
logger.warn(String.format("当前账户(%s)下所有账户都未设置密码,请先使用验证码登录激活账户",formDTO.getUserAccount())); logger.warn(String.format("当前账户(%s)下所有账户都未设置密码,请先使用验证码登录激活账户",formDTO.getUserAccount()));
@ -670,7 +668,6 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
} }
logger.info("getMyOrgByAccountService checkpassword cost:{}",System.currentTimeMillis() - start); logger.info("getMyOrgByAccountService checkpassword cost:{}",System.currentTimeMillis() - start);
start = System.currentTimeMillis(); start = System.currentTimeMillis();
CustomerStaffDTO customerStaffDTO = customerStaffList.get(0);
String tempKey = RedisKeys.getCustomerStaffTempKey(customerStaffDTO.getUserId()); String tempKey = RedisKeys.getCustomerStaffTempKey(customerStaffDTO.getUserId());
List<StaffOrgsResultDTO> redisTemp = (List<StaffOrgsResultDTO>)redisUtils.get(tempKey); List<StaffOrgsResultDTO> redisTemp = (List<StaffOrgsResultDTO>)redisUtils.get(tempKey);
if (redisTemp != null){ if (redisTemp != null){

Loading…
Cancel
Save