修改es序列号对象

This commit is contained in:
sh
2025-10-31 14:58:40 +08:00
parent caad797002
commit a350dfbfd6
2 changed files with 10 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
package com.ruoyi.cms.service.impl;
import com.alibaba.fastjson.JSON;
import com.ruoyi.cms.domain.vo.CompanyVo;
import com.ruoyi.cms.service.ICompanyService;
import com.ruoyi.common.core.domain.entity.AppUser;
import com.ruoyi.cms.domain.ESJobDocument;
@@ -100,6 +102,8 @@ public class ESJobSearchImpl implements IESJobSearchService
for (Job job : jobList) {
ESJobDocument esJobDocument = new ESJobDocument();
BeanUtils.copyBeanProp(esJobDocument, job);
CompanyVo vo=job.getCompanyVo();
esJobDocument.setCompanyVoJson(JSON.toJSONString(vo));
esJobDocument.setAppJobUrl("https://qd.zhaopinzao8dian.com/app#/packageA/pages/post/post?jobId="+ Base64.getEncoder().encodeToString(String.valueOf(job.getJobId()).getBytes()));
if(!StringUtil.isEmptyOrNull(job.getScale())){
esJobDocument.setScale(Integer.valueOf(job.getScale()));
@@ -427,6 +431,9 @@ public class ESJobSearchImpl implements IESJobSearchService
if(!StringUtil.isEmptyOrNull(esJobSearch.getCode())){
wrapper.and(x->x.eq(ESJobDocument::getCode,esJobSearch.getCode()));
}
if(esJobSearch.getJobId()!=null){
wrapper.and(x->x.eq(ESJobDocument::getJobId,esJobSearch.getJobId()));
}
if(Objects.nonNull(esJobSearch.getOrder())){
if(esJobSearch.getOrder()==1){
wrapper.orderByDesc(ESJobDocument::getIsHot);