This commit is contained in:
chenyanchang
2026-06-04 18:11:35 +08:00
parent 24eced691e
commit 715cc55a8c
2 changed files with 3 additions and 0 deletions

View File

@@ -187,6 +187,7 @@ public class CmsJobController extends BaseController
jobList.stream().forEach(it->{
Job job=new Job();
BeanUtils.copyBeanProp(job, it);
job.setScale(it.getScale() != null ? String.valueOf(it.getScale()) : "0");
job.setCompanyVo(JSON.parseObject(it.getCompanyVoJson(), CompanyVo.class));
jobs.add(job);
});

View File

@@ -181,6 +181,8 @@ public class ESJobSearchImpl implements IESJobSearchService
for (Job job : jobList) {
ESJobDocument esJobDocument = new ESJobDocument();
BeanUtils.copyBeanProp(esJobDocument, job);
//类型转换导致赋值问题,重新赋值
esJobDocument.setScale(org.apache.commons.lang3.StringUtils.isNotEmpty(job.getScale()) ? Integer.parseInt(job.getScale()) : 0);
CompanyVo vo=job.getCompanyVo();
esJobDocument.setCompanyVoJson(JSON.toJSONString(vo));
esJobDocument.setAppJobUrl("https://www.xjksly.cn/app#/packageA/pages/post/post?jobId="+ job.getJobId());