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 459941582f..5207e1f743 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 @@ -607,8 +607,16 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol @Override public List getMyOrgByAccount(ThirdStaffOrgByAccountFormDTO formDTO) { + //{"isNovice":false,"mobile":"","userAccount":"18700011111","password":"Py011111","appId":"wx2b75d556ba867750"} + + String appId = formDTO.getAppId(); + String userAccount = formDTO.getUserAccount(); + String password = formDTO.getPassword(); + + logger.info("getMyOrgByAccount start at:{}",System.currentTimeMillis()); //0.根据appId查询对应客户Id PaCustomerDTO customer = this.getCustomerInfo(formDTO.getAppId()); + logger.info("getMyOrgByAccount getCustomerInfo cost:{}",System.currentTimeMillis()); //7.28 上边根据appId只能锁定一条客户id,后边的批量循环操作暂不做调整,还是使用之前的代码 sun //1、根据手机号查询到用户信息 ThirdCustomerStaffByAccountFormDTO dto = new ThirdCustomerStaffByAccountFormDTO(); @@ -619,6 +627,7 @@ 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()); //2、密码是否正确 List customerStaffList=customerStaffResult.getData(); if (CollectionUtils.isEmpty(customerStaffList)){ @@ -656,18 +665,22 @@ 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()); 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()); 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()); redisUtils.set(tempKey,data); + logger.info("getMyOrgByAccount getCustomerStaffTempKey set redis cost:{}",System.currentTimeMillis()); return data; } logger.warn(String .format("手机验证码获取组织,调用%s服务失败,入参账户%s,密码%s,返回错误码%s,错误提示信息%s",