Browse Source

修改bug

master
qushutong 1 year ago
parent
commit
d53948e94f
  1. 20
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyUnitRedis.java

20
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/redis/IcPartyUnitRedis.java

@ -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; 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); String serviceOrgNameKey = RedisKeys.getServiceOrgNameKey(customerId, serviceOrgType, serviceOrgId);
Object o = redisUtils.get(serviceOrgNameKey); Object o = redisUtils.get(serviceOrgNameKey);
if (null != o){ if (null != o) {
return o.toString(); return o.toString();
} }
String name = ""; String name = "";
if (serviceOrgType.equals(IcCommunitySelfOrganizationConstant.SERVICE_ORG_TYPE_COMMUNITY_ORG)){ if (serviceOrgType.equals(IcCommunitySelfOrganizationConstant.SERVICE_ORG_TYPE_COMMUNITY_ORG)) {
name = communitySelfOrganizationDao.getCommunityOrgName(serviceOrgId); 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); 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); Result<IcResiUserDTO> icResiUserDTO = userOpenFeignClient.getIcResiUserDTO(serviceOrgId);
if (!icResiUserDTO.success()){ if (!icResiUserDTO.success()) {
throw new EpmetException("getIcResiUserDTO method is failure"); throw new EpmetException("getIcResiUserDTO method is failure");
} }
if (null != icResiUserDTO.getData()) {
name = icResiUserDTO.getData().getName(); name = icResiUserDTO.getData().getName();
} }
redisUtils.set(serviceOrgNameKey,name,RedisUtils.DEFAULT_EXPIRE); }
redisUtils.set(serviceOrgNameKey, name, RedisUtils.DEFAULT_EXPIRE);
return name; return name;
} }

Loading…
Cancel
Save