|
|
@ -47,33 +47,35 @@ public class IcPartyUnitRedis { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public void set(){ |
|
|
|
public void set() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public String get(String id){ |
|
|
|
public String get(String id) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
public String getServiceOrgName(String customerId,String serviceOrgType,String serviceOrgId){ |
|
|
|
public String getServiceOrgName(String customerId, String serviceOrgType, String serviceOrgId) { |
|
|
|
String serviceOrgNameKey = RedisKeys.getServiceOrgNameKey(customerId, serviceOrgType, serviceOrgId); |
|
|
|
Object o = redisUtils.get(serviceOrgNameKey); |
|
|
|
if (null != o){ |
|
|
|
if (null != o) { |
|
|
|
return o.toString(); |
|
|
|
} |
|
|
|
String name = ""; |
|
|
|
if (serviceOrgType.equals(IcCommunitySelfOrganizationConstant.SERVICE_ORG_TYPE_COMMUNITY_ORG)){ |
|
|
|
if (serviceOrgType.equals(IcCommunitySelfOrganizationConstant.SERVICE_ORG_TYPE_COMMUNITY_ORG)) { |
|
|
|
name = communitySelfOrganizationDao.getCommunityOrgName(serviceOrgId); |
|
|
|
}else if (serviceOrgType.equals(IcCommunitySelfOrganizationConstant.SERVICE_ORG_TYPE_PARTY_UNIT)){ |
|
|
|
} else if (serviceOrgType.equals(IcCommunitySelfOrganizationConstant.SERVICE_ORG_TYPE_PARTY_UNIT)) { |
|
|
|
name = communitySelfOrganizationDao.getPartyUnitName(serviceOrgId); |
|
|
|
}else if (serviceOrgType.equals(IcCommunitySelfOrganizationConstant.SERVICE_ORG_TYPE_IC_USER_VOLUNTEEr)){ |
|
|
|
} else if (serviceOrgType.equals(IcCommunitySelfOrganizationConstant.SERVICE_ORG_TYPE_IC_USER_VOLUNTEEr)) { |
|
|
|
Result<IcResiUserDTO> icResiUserDTO = userOpenFeignClient.getIcResiUserDTO(serviceOrgId); |
|
|
|
if (!icResiUserDTO.success()){ |
|
|
|
if (!icResiUserDTO.success()) { |
|
|
|
throw new EpmetException("getIcResiUserDTO method is failure"); |
|
|
|
} |
|
|
|
name = icResiUserDTO.getData().getName(); |
|
|
|
if (null != icResiUserDTO.getData()) { |
|
|
|
name = icResiUserDTO.getData().getName(); |
|
|
|
} |
|
|
|
} |
|
|
|
redisUtils.set(serviceOrgNameKey,name,RedisUtils.DEFAULT_EXPIRE); |
|
|
|
redisUtils.set(serviceOrgNameKey, name, RedisUtils.DEFAULT_EXPIRE); |
|
|
|
return name; |
|
|
|
} |
|
|
|
|
|
|
|