diff --git a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ESJobSearchImpl.java b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ESJobSearchImpl.java index ee73149..8888758 100644 --- a/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ESJobSearchImpl.java +++ b/ruoyi-bussiness/src/main/java/com/ruoyi/cms/service/impl/ESJobSearchImpl.java @@ -406,7 +406,11 @@ public class ESJobSearchImpl implements IESJobSearchService wrapper.and(x->x.le(ESJobDocument::getExperience_int,maxValue)); } if(!StringUtil.isEmptyOrNull(esJobSearch.getJobCategory())){ - wrapper.and(x->x.eq(ESJobDocument::getJobCategory,esJobSearch.getJobCategory())); + //wrapper.and(x->x.eq(ESJobDocument::getJobCategory,esJobSearch.getJobCategory())); + String targetValue = esJobSearch.getJobCategory(); + wrapper.and(x -> x.like(ESJobDocument::getJobCategory, targetValue) + .or() + .like(ESJobDocument::getJobTitle, targetValue)); } if(!StringUtil.isEmptyOrNull(esJobSearch.getScale())){ Integer maxValue = StringUtil.findMaxValue(esJobSearch.getScale());