|
|
@ -11,6 +11,7 @@ import com.epmet.commons.rocketmq.messages.LoginMQMsg; |
|
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
|
import com.epmet.commons.tools.constant.ServiceConstant; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.exception.ExceptionUtils; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.feign.ResultDataResolver; |
|
|
@ -620,6 +621,9 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol |
|
|
|
} |
|
|
|
//2、密码是否正确
|
|
|
|
List<CustomerStaffDTO> customerStaffList=customerStaffResult.getData(); |
|
|
|
if (CollectionUtils.isEmpty(customerStaffList)){ |
|
|
|
throw new EpmetException(EpmetErrorCode.GOV_STAFF_ACCOUNT_NOT_EXISTS.getCode()); |
|
|
|
} |
|
|
|
//3、查询用户所有的组织信息
|
|
|
|
List<String> customerIdList = new ArrayList<>(); |
|
|
|
//是否设置过密码
|
|
|
@ -652,11 +656,19 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol |
|
|
|
logger.warn(String.format("根据当前账户(%s)密码未找到所属组织,密码错误",formDTO.getUserAccount())); |
|
|
|
throw new RenException(EpmetErrorCode.PASSWORD_ERROR.getCode()); |
|
|
|
} |
|
|
|
CustomerStaffDTO customerStaffDTO = customerStaffList.get(0); |
|
|
|
String tempKey = RedisKeys.getCustomerStaffTempKey(customerStaffDTO.getUserId()); |
|
|
|
List<StaffOrgsResultDTO> redisTemp = (List<StaffOrgsResultDTO>)redisUtils.get(tempKey); |
|
|
|
if (redisTemp != null){ |
|
|
|
return redisTemp; |
|
|
|
} |
|
|
|
StaffOrgFormDTO staffOrgFormDTO = new StaffOrgFormDTO(); |
|
|
|
staffOrgFormDTO.setCustomerIdList(customerIdList); |
|
|
|
Result<List<StaffOrgsResultDTO>> result = govOrgOpenFeignClient.getStaffOrgList(staffOrgFormDTO); |
|
|
|
if(result.success()&&null!=result.getData()){ |
|
|
|
return result.getData(); |
|
|
|
List<StaffOrgsResultDTO> data = result.getData(); |
|
|
|
redisUtils.set(tempKey,data,30*60); |
|
|
|
return data; |
|
|
|
} |
|
|
|
logger.warn(String .format("手机验证码获取组织,调用%s服务失败,入参账户%s,密码%s,返回错误码%s,错误提示信息%s", |
|
|
|
ServiceConstant.GOV_ORG_SERVER, |
|
|
|