修改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

@@ -2,7 +2,6 @@ package com.ruoyi.cms.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.cms.domain.vo.CompanyVo;
import com.ruoyi.common.core.domain.entity.Company;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -151,7 +150,7 @@ public class ESJobDocument
@ApiModelProperty("信用代码")
private String code;
/*@ApiModelProperty("公司信息")
@IndexField(fieldType = FieldType.OBJECT)
private CompanyVo companyVo;*/
@ApiModelProperty("公司信息")
@IndexField(fieldType = FieldType.TEXT)
private String companyVoJson;
}

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);