设置es查询去掉永久有效的排除,改成2个小时有效

This commit is contained in:
chenshaohua
2026-06-30 11:38:40 +08:00
parent aa04293c73
commit a4c401b0e3

View File

@@ -581,7 +581,7 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
List<ESJobDocument> jobListResult = iesJobSearchService.selectTextListExceptJobId(esJobSearch,jobList); List<ESJobDocument> jobListResult = iesJobSearchService.selectTextListExceptJobId(esJobSearch,jobList);
//存入当前session中查看的岗位 避免重复 todo 定时删除 key上保存用户信息 //存入当前session中查看的岗位 避免重复 todo 定时删除 key上保存用户信息
jobList.addAll(jobListResult.stream().map(ESJobDocument::getJobId).collect(Collectors.toList())); jobList.addAll(jobListResult.stream().map(ESJobDocument::getJobId).collect(Collectors.toList()));
redisCache.setCacheObject(esJobSearch.getSessionId(),jobList); redisCache.setCacheObject(esJobSearch.getSessionId(),jobList,2,TimeUnit.HOURS);
List<ESJobDocument> esJobDocuments = userCollection(jobListResult); List<ESJobDocument> esJobDocuments = userCollection(jobListResult);
return esJobDocuments; return esJobDocuments;
} }