更新:1.新增岗位直接发布时添加到es;2.是否投递处理。
This commit is contained in:
@@ -145,10 +145,10 @@ public class JobApplyServiceImpl extends ServiceImpl<JobApplyMapper,JobApply> im
|
||||
List<Long> ids = jobApplies.stream().map(JobApply::getId).collect(Collectors.toList());
|
||||
jobApplyMapper.deleteBatchIds(ids);
|
||||
}
|
||||
jobApplyMapper.insert(jobApply);
|
||||
int num = jobApplyMapper.insert(jobApply);
|
||||
//添加消息说明
|
||||
|
||||
return 0;
|
||||
return num;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -382,6 +382,10 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
if(!longs.isEmpty()){
|
||||
fileMapper.updateBussinessids(longs,job.getJobId());
|
||||
}
|
||||
if (job.getIsPublish() == 1) {
|
||||
//同步到es
|
||||
iesJobSearchService.updateJob(job.getJobId());
|
||||
}
|
||||
}
|
||||
return insert;
|
||||
}
|
||||
@@ -1093,16 +1097,23 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
||||
|
||||
private List<ESJobDocument> sysUserCollection(List<ESJobDocument> jobs){
|
||||
if(jobs.isEmpty()){return new ArrayList<>();}
|
||||
if(SecurityUtils.isLogin()){
|
||||
// 优先使用 App 端用户,兜底使用 PC 端用户
|
||||
Long userId = null;
|
||||
if(SiteSecurityUtils.isLogin()){
|
||||
userId = SiteSecurityUtils.getUserId();
|
||||
} else if(SecurityUtils.isLogin()){
|
||||
userId = SecurityUtils.getUserId();
|
||||
}
|
||||
if(userId != null){
|
||||
//收藏
|
||||
Set<Long> collectionIds = jobCollectionMapper.selectList(Wrappers.<JobCollection>lambdaQuery()
|
||||
.eq(JobCollection::getUserId, SecurityUtils.getUserId())
|
||||
.in(JobCollection::getJobId, jobs.stream().map(ESJobDocument::getJobId).collect(Collectors.toList())))
|
||||
.stream().map(JobCollection::getJobId).collect(Collectors.toSet());
|
||||
Set<Long> applyJobIds = new HashSet<>();
|
||||
List<Job> jobList = jobApplyMapper.applyJob(SecurityUtils.getUserId());
|
||||
List<Job> jobList = jobApplyMapper.applyJob(userId);
|
||||
if (CollectionUtils.isNotEmpty(jobList)) {
|
||||
applyJobIds = jobApplyMapper.applyJob(SecurityUtils.getUserId()).stream().map(Job::getJobId).collect(Collectors.toSet());
|
||||
applyJobIds = jobList.stream().map(Job::getJobId).collect(Collectors.toSet());
|
||||
}
|
||||
for (ESJobDocument j : jobs) {
|
||||
if (collectionIds.contains(j.getJobId())) {
|
||||
|
||||
Reference in New Issue
Block a user