diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java index 5207e1f743..62f1fe4a83 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java @@ -613,10 +613,11 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol String userAccount = formDTO.getUserAccount(); String password = formDTO.getPassword(); - logger.info("getMyOrgByAccount start at:{}",System.currentTimeMillis()); + long start = System.currentTimeMillis(); //0.根据appId查询对应客户Id PaCustomerDTO customer = this.getCustomerInfo(formDTO.getAppId()); - logger.info("getMyOrgByAccount getCustomerInfo cost:{}",System.currentTimeMillis()); + logger.info("getMyOrgByAccountService getCustomerInfo cost:{}",System.currentTimeMillis() - start ); + start = System.currentTimeMillis(); //7.28 上边根据appId只能锁定一条客户id,后边的批量循环操作暂不做调整,还是使用之前的代码 sun //1、根据手机号查询到用户信息 ThirdCustomerStaffByAccountFormDTO dto = new ThirdCustomerStaffByAccountFormDTO(); @@ -627,7 +628,8 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol logger.warn(String.format("账户密码登录异常,账户[%s],code[%s],msg[%s]", formDTO.getUserAccount(), customerStaffResult.getCode(), customerStaffResult.getMsg())); throw new RenException(customerStaffResult.getCode()); } - logger.info("getMyOrgByAccount getCustsomerStaffByIdAndAccount cost:{}",System.currentTimeMillis()); + logger.info("getMyOrgByAccountService getCustsomerStaffByIdAndAccount cost:{}",System.currentTimeMillis()- start); + start = System.currentTimeMillis(); //2、密码是否正确 List customerStaffList=customerStaffResult.getData(); if (CollectionUtils.isEmpty(customerStaffList)){ @@ -665,22 +667,25 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol logger.warn(String.format("根据当前账户(%s)密码未找到所属组织,密码错误",formDTO.getUserAccount())); throw new RenException(EpmetErrorCode.PASSWORD_ERROR.getCode()); } - logger.info("getMyOrgByAccount checkpassword cost:{}",System.currentTimeMillis()); + logger.info("getMyOrgByAccountService checkpassword cost:{}",System.currentTimeMillis() - start); + start = System.currentTimeMillis(); CustomerStaffDTO customerStaffDTO = customerStaffList.get(0); String tempKey = RedisKeys.getCustomerStaffTempKey(customerStaffDTO.getUserId()); List redisTemp = (List)redisUtils.get(tempKey); if (redisTemp != null){ return redisTemp; } - logger.info("getMyOrgByAccount getCustomerStaffTempKey cost:{}",System.currentTimeMillis()); + logger.info("getMyOrgByAccountService getCustomerStaffTempKey cost:{}",System.currentTimeMillis()-start); + start = System.currentTimeMillis(); StaffOrgFormDTO staffOrgFormDTO = new StaffOrgFormDTO(); staffOrgFormDTO.setCustomerIdList(customerIdList); Result> result = govOrgOpenFeignClient.getStaffOrgList(staffOrgFormDTO); if(result.success()&&null!=result.getData()){ List data = result.getData(); - logger.info("getMyOrgByAccount getStaffOrgList from db cost:{}",System.currentTimeMillis()); + logger.info("getMyOrgByAccountService getStaffOrgList from db cost:{}",System.currentTimeMillis() -start); + start = System.currentTimeMillis(); redisUtils.set(tempKey,data); - logger.info("getMyOrgByAccount getCustomerStaffTempKey set redis cost:{}",System.currentTimeMillis()); + logger.info("getMyOrgByAccountService getCustomerStaffTempKey set redis cost:{}",System.currentTimeMillis()-start); return data; } logger.warn(String .format("手机验证码获取组织,调用%s服务失败,入参账户%s,密码%s,返回错误码%s,错误提示信息%s",