Merge branch 'main' of http://124.243.245.42:3000/zkr/shz-backend
This commit is contained in:
@@ -1097,21 +1097,15 @@ public class JobServiceImpl extends ServiceImpl<JobMapper,Job> implements IJobSe
|
|||||||
|
|
||||||
private List<ESJobDocument> sysUserCollection(List<ESJobDocument> jobs){
|
private List<ESJobDocument> sysUserCollection(List<ESJobDocument> jobs){
|
||||||
if(jobs.isEmpty()){return new ArrayList<>();}
|
if(jobs.isEmpty()){return new ArrayList<>();}
|
||||||
// 优先使用 App 端用户,兜底使用 PC 端用户
|
if(SecurityUtils.isLogin()){
|
||||||
Long userId = null;
|
log.error("--------SecurityUtils.getUserId():" + SecurityUtils.getUserId());
|
||||||
if(SiteSecurityUtils.isLogin()){
|
|
||||||
userId = SiteSecurityUtils.getUserId();
|
|
||||||
} else if(SecurityUtils.isLogin()){
|
|
||||||
userId = SecurityUtils.getUserId();
|
|
||||||
}
|
|
||||||
if(userId != null){
|
|
||||||
//收藏
|
//收藏
|
||||||
Set<Long> collectionIds = jobCollectionMapper.selectList(Wrappers.<JobCollection>lambdaQuery()
|
Set<Long> collectionIds = jobCollectionMapper.selectList(Wrappers.<JobCollection>lambdaQuery()
|
||||||
.eq(JobCollection::getUserId, userId)
|
.eq(JobCollection::getUserId, SecurityUtils.getUserId())
|
||||||
.in(JobCollection::getJobId, jobs.stream().map(ESJobDocument::getJobId).collect(Collectors.toList())))
|
.in(JobCollection::getJobId, jobs.stream().map(ESJobDocument::getJobId).collect(Collectors.toList())))
|
||||||
.stream().map(JobCollection::getJobId).collect(Collectors.toSet());
|
.stream().map(JobCollection::getJobId).collect(Collectors.toSet());
|
||||||
Set<Long> applyJobIds = new HashSet<>();
|
Set<Long> applyJobIds = new HashSet<>();
|
||||||
List<Job> jobList = jobApplyMapper.applyJob(userId);
|
List<Job> jobList = jobApplyMapper.applyJob(SecurityUtils.getUserId());
|
||||||
if (CollectionUtils.isNotEmpty(jobList)) {
|
if (CollectionUtils.isNotEmpty(jobList)) {
|
||||||
applyJobIds = jobList.stream().map(Job::getJobId).collect(Collectors.toSet());
|
applyJobIds = jobList.stream().map(Job::getJobId).collect(Collectors.toSet());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user