|
|
@ -594,12 +594,12 @@ public class GovOrgServiceImpl implements GovOrgService { |
|
|
|
if (staffInfo == null || StringUtils.isBlank(staffInfo.getAgencyId())){ |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"工作人员所属组织不存在"); |
|
|
|
} |
|
|
|
String agencyId = staffInfo.getAgencyId(); |
|
|
|
String client = formDTO.getClient(); |
|
|
|
//组织缓存key
|
|
|
|
String treeCacheKey = RedisKeys.getOrgTreeCacheKey(formDTO.getAgencyId()).concat(StrConstant.COLON).concat(formDTO.getClient()); |
|
|
|
String treeCacheKey = RedisKeys.getOrgTreeCacheKey(agencyId).concat(StrConstant.COLON).concat(client); |
|
|
|
Long expiryTime = redisUtils.getTTL(treeCacheKey); |
|
|
|
List<OrgTreeResultDTO> orgTreeResultDTOS = (List<OrgTreeResultDTO>) redisUtils.get(treeCacheKey); |
|
|
|
String agencyId = staffInfo.getAgencyId(); |
|
|
|
String client = formDTO.getClient(); |
|
|
|
//如果接近过期或已经过期且缓存数据不为空 则异步查询
|
|
|
|
if ((expiryTime == null || expiryTime <= NumConstant.ONE_THOUSAND) && CollectionUtils.isNotEmpty(orgTreeResultDTOS)) { |
|
|
|
executorService.submit(() -> { |
|
|
|