添加pc互联网端,区县工作,公交周边,商圈附近3个接口

This commit is contained in:
sh
2026-06-22 18:33:36 +08:00
parent f18f179f3d
commit 18ccf628fc
4 changed files with 97 additions and 8 deletions

View File

@@ -579,6 +579,30 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
return esJobDocumentEsPageInfo;
}
@Override
public EsPageInfo<ESJobDocument> sysCountyJobList(ESJobSearch job) {
EsPageInfo<ESJobDocument> esJobDocumentEsPageInfo = iesJobSearchService.countyJobList(job);
List<ESJobDocument> esJobDocuments = sysUserCollection(esJobDocumentEsPageInfo.getList());
esJobDocumentEsPageInfo.setList(esJobDocuments);
return esJobDocumentEsPageInfo;
}
@Override
public EsPageInfo<ESJobDocument> sysSubway(ESJobSearch jobQuery) {
EsPageInfo<ESJobDocument> esJobDocumentEsPageInfo = iesJobSearchService.subway(jobQuery);
List<ESJobDocument> esJobDocuments = sysUserCollection(esJobDocumentEsPageInfo.getList());
esJobDocumentEsPageInfo.setList(esJobDocuments);
return esJobDocumentEsPageInfo;
}
@Override
public EsPageInfo<ESJobDocument> sysCommercialArea(ESJobSearch jobQuery) {
EsPageInfo<ESJobDocument> esJobDocumentEsPageInfo = iesJobSearchService.commercialArea(jobQuery);
List<ESJobDocument> esJobDocuments = sysUserCollection(esJobDocumentEsPageInfo.getList());
esJobDocumentEsPageInfo.setList(esJobDocuments);
return esJobDocumentEsPageInfo;
}
@Override
public Job selectJobByJobIdApp(Long jobId) {
Job job = jobMapper.selectById(jobId);
@@ -1045,14 +1069,17 @@ 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()){
//收藏
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());
for (ESJobDocument j : jobs) {
if (collectionIds.contains(j.getJobId())) {
j.setIsCollection(1);
Long userId=RoleUtils.getAppUserId();
if(userId!=null){
//收藏
Set<Long> collectionIds = jobCollectionMapper.selectList(Wrappers.<JobCollection>lambdaQuery()
.eq(JobCollection::getUserId, userId)
.in(JobCollection::getJobId, jobs.stream().map(ESJobDocument::getJobId).collect(Collectors.toList())))
.stream().map(JobCollection::getJobId).collect(Collectors.toSet());
for (ESJobDocument j : jobs) {
if (collectionIds.contains(j.getJobId())) {
j.setIsCollection(1);
}
}
}
}