Merge branch 'main' of ssh://124.243.245.42:2222/zkr/shz-backend
This commit is contained in:
@@ -169,13 +169,18 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|||||||
companyContactMapper.update(null,Wrappers.<CompanyContact>lambdaUpdate()
|
companyContactMapper.update(null,Wrappers.<CompanyContact>lambdaUpdate()
|
||||||
.eq(CompanyContact::getCompanyId, company.getCompanyId())
|
.eq(CompanyContact::getCompanyId, company.getCompanyId())
|
||||||
.set(CompanyContact::getDelFlag, Constants.Del_FLAG_DELETE));
|
.set(CompanyContact::getDelFlag, Constants.Del_FLAG_DELETE));
|
||||||
if(!Objects.isNull(company.getCompanyContactList())){
|
List<CompanyContact> contactList = company.getCompanyContactList();
|
||||||
company.getCompanyContactList().forEach(x -> {
|
if (!Objects.isNull(contactList)) {
|
||||||
CompanyContact companyContact = new CompanyContact();
|
for (CompanyContact x : contactList) {
|
||||||
companyContact.setCompanyId(company.getCompanyId());
|
CompanyContact entity = new CompanyContact();
|
||||||
BeanUtils.copyProperties(x, companyContact);
|
entity.setCompanyId(company.getCompanyId());
|
||||||
companyContactMapper.insert(companyContact);
|
BeanUtils.copyProperties(x, entity);
|
||||||
});
|
if (entity.getId() != null) {
|
||||||
|
companyContactMapper.updateById(entity);
|
||||||
|
} else {
|
||||||
|
companyContactMapper.insert(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (companyNatureChanged) {
|
if (companyNatureChanged) {
|
||||||
List<Long> jobIds = jobMapper.selectList(Wrappers.<Job>lambdaQuery()
|
List<Long> jobIds = jobMapper.selectList(Wrappers.<Job>lambdaQuery()
|
||||||
|
|||||||
@@ -705,9 +705,7 @@ public class ESJobSearchImpl implements IESJobSearchService
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
if(hasText(jobQuery.getJobTitle())){
|
if(hasText(jobQuery.getJobTitle())){
|
||||||
wrapper.and(a->a.match(ESJobDocument::getJobTitle,jobQuery.getJobTitle().trim(),5.0f)
|
wrapper.and(a->a.match(ESJobDocument::getJobTitle,jobQuery.getJobTitle().trim(),5.0f));
|
||||||
.or()
|
|
||||||
.match(ESJobDocument::getDescription,jobQuery.getJobTitle().trim(),1.0f));
|
|
||||||
}
|
}
|
||||||
if(hasText(jobQuery.getEducation())){
|
if(hasText(jobQuery.getEducation())){
|
||||||
// 支持逗号分隔的多值筛选(如 "3,4")
|
// 支持逗号分隔的多值筛选(如 "3,4")
|
||||||
@@ -775,21 +773,27 @@ public class ESJobSearchImpl implements IESJobSearchService
|
|||||||
wrapper.le(ESJobDocument::getPostingDate, DateUtils.ES_DATE_FORMATTER.format(endDate.toInstant()));
|
wrapper.le(ESJobDocument::getPostingDate, DateUtils.ES_DATE_FORMATTER.format(endDate.toInstant()));
|
||||||
}
|
}
|
||||||
// 先开启打分、优先按匹配分数排序(关键词前台命中越高越靠前)
|
// 先开启打分、优先按匹配分数排序(关键词前台命中越高越靠前)
|
||||||
wrapper.trackScores();
|
// wrapper.trackScores();
|
||||||
wrapper.sortByScore(SortOrder.DESC);
|
// wrapper.sortByScore(SortOrder.DESC);
|
||||||
if(Objects.nonNull(jobQuery.getOrder())){
|
if(Objects.nonNull(jobQuery.getOrder())){
|
||||||
wrapper.sort(SortBuilders.fieldSort("postingDate").order(SortOrder.DESC).missing("_last"));
|
switch (jobQuery.getOrder()) {
|
||||||
if(jobQuery.getOrder()==1){
|
case 0: // 推荐:权重 → 最新发布
|
||||||
wrapper.orderByDesc(ESJobDocument::getIsHot);
|
wrapper.sort(SortBuilders.fieldSort("postingDate").order(SortOrder.DESC).missing("_last"));
|
||||||
wrapper.orderByDesc(ESJobDocument::getApplyNum);
|
break;
|
||||||
wrapper.orderByDesc(ESJobDocument::getView);
|
case 1: // 最热:权重 → 热度
|
||||||
|
wrapper.orderByDesc(ESJobDocument::getIsHot);
|
||||||
|
wrapper.orderByDesc(ESJobDocument::getApplyNum);
|
||||||
|
wrapper.orderByDesc(ESJobDocument::getView);
|
||||||
|
break;
|
||||||
|
case 2: // 最新发布:权重 → 最新发布
|
||||||
|
wrapper.sort(SortBuilders.fieldSort("postingDate").order(SortOrder.DESC).missing("_last"));
|
||||||
|
break;
|
||||||
|
case 3: // 最大薪资:权重 → 最高薪资
|
||||||
|
wrapper.orderByDesc(ESJobDocument::getMaxSalary);
|
||||||
|
break;
|
||||||
|
default: // 默认:权重 → 最新发布
|
||||||
|
wrapper.sort(SortBuilders.fieldSort("postingDate").order(SortOrder.DESC).missing("_last"));
|
||||||
}
|
}
|
||||||
if(jobQuery.getOrder()==3){
|
|
||||||
wrapper.orderByDesc(ESJobDocument::getMaxSalary);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
//默认按照发布时间倒叙
|
|
||||||
wrapper.sort(SortBuilders.fieldSort("postingDate").order(SortOrder.DESC).missing("_last"));
|
|
||||||
}
|
}
|
||||||
EsPageInfo<ESJobDocument> esJobDocumentEsPageInfo = esJobDocumentMapper.pageQuery(wrapper, pageNum, pageSize);
|
EsPageInfo<ESJobDocument> esJobDocumentEsPageInfo = esJobDocumentMapper.pageQuery(wrapper, pageNum, pageSize);
|
||||||
return esJobDocumentEsPageInfo;
|
return esJobDocumentEsPageInfo;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
<result property="isRead" column="is_read"/>
|
<result property="isRead" column="is_read"/>
|
||||||
|
<result property="meetingType" column="meeting_type"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- VO 带公司名和岗位名(继承基础映射,jobTitle 来自关联查询的实时数据) -->
|
<!-- VO 带公司名和岗位名(继承基础映射,jobTitle 来自关联查询的实时数据) -->
|
||||||
@@ -65,7 +66,7 @@
|
|||||||
t.interview_time, t.interview_method, t.meeting_link,
|
t.interview_time, t.interview_method, t.meeting_link,
|
||||||
t.meeting_password, t.interview_location,
|
t.meeting_password, t.interview_location,
|
||||||
t.contact_phone, t.interviewer_name,
|
t.contact_phone, t.interviewer_name,
|
||||||
t.job_name, t.status, t.del_flag,t.is_read,
|
t.job_name, t.status, t.del_flag,t.is_read,t.meeting_type,
|
||||||
t.create_by, t.create_time, t.update_by, t.update_time, t.remark,
|
t.create_by, t.create_time, t.update_by, t.update_time, t.remark,
|
||||||
COALESCE(c.name, t.company_name) as company_name,
|
COALESCE(c.name, t.company_name) as company_name,
|
||||||
COALESCE(j.job_title, t.job_name) as job_title,
|
COALESCE(j.job_title, t.job_name) as job_title,
|
||||||
|
|||||||
Reference in New Issue
Block a user