|
@@ -1715,27 +1715,10 @@ public class KwsEnterpriseService {
|
|
|
if (Objects.isNull(entId)) {
|
|
if (Objects.isNull(entId)) {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
- String key = Global.REDIS_ENTERPRISE_PREFIX + entId;
|
|
|
|
|
- String dictCache = RedissonUtils.getString(key);
|
|
|
|
|
- //从redis查,查不到从数据库查,并写入redis
|
|
|
|
|
- if (StringUtils.isBlank(dictCache)) {
|
|
|
|
|
- EntCacheResDto entCacheResDto = getEntCacheResDto(entId);
|
|
|
|
|
- if (Objects.isNull(entCacheResDto)) {
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
- RedissonUtils.putString(key, JSON.toJSONString(entCacheResDto), Global.COMMON_EXPIRE);
|
|
|
|
|
- return entCacheResDto;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- EntCacheResDto entCacheResDto = JSONObject.parseObject(dictCache, EntCacheResDto.class);
|
|
|
|
|
- if (Objects.isNull(entCacheResDto.getContactsId())) {
|
|
|
|
|
- entCacheResDto = getEntCacheResDto(entId);
|
|
|
|
|
- if (Objects.isNull(entCacheResDto)) {
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ EntCacheResDto entCacheResDto = getEntCacheResDto(entId);
|
|
|
|
|
+ if (Objects.isNull(entCacheResDto)) {
|
|
|
|
|
+ return null;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- RedissonUtils.putString(key, dictCache, Global.COMMON_EXPIRE);
|
|
|
|
|
return entCacheResDto;
|
|
return entCacheResDto;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|