From c7e5ab1d0b242a3ccf9cec1255a4d773bbbdf142 Mon Sep 17 00:00:00 2001
From: whywhyo <1511349576@qq.com>
Date: 星期一, 18 九月 2023 23:17:29 +0800
Subject: [PATCH] 7156

---
 zhang-content/src/main/java/com/ruoyi/service/impl/EsServiceImpl.java            |    3 ++-
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java |    8 +++-----
 zhang-content/src/main/java/com/ruoyi/service/impl/ZPropertyServiceImpl.java     |    3 ++-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java
index 1a57cd7..b3475fe 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/EsSearchController.java
@@ -4,12 +4,10 @@
 import com.ruoyi.common.core.domain.entity.EsModel;
 import com.ruoyi.service.EsService;
 import org.springframework.data.elasticsearch.core.SearchHits;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.websocket.server.PathParam;
 import java.util.List;
 
 /**
@@ -26,7 +24,7 @@
     EsService esService;
 
     @GetMapping()
-    public AjaxResult search(String keyword){
+    public AjaxResult search(@PathParam("keyword") String keyword){
         List<EsModel> byCondition = esService.findByCondition(keyword);
         return AjaxResult.success(byCondition);
     }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/EsServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/EsServiceImpl.java
index e85f759..87b37e2 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/EsServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/EsServiceImpl.java
@@ -76,6 +76,7 @@
 
 
         BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
+//        boolQueryBuilder.filter(QueryBuilders.termsQuery("fid", idList));
         boolQueryBuilder.should(QueryBuilders.matchQuery("ctName",con));
         boolQueryBuilder.should(QueryBuilders.matchQuery("ctContent",con));
         boolQueryBuilder.should(QueryBuilders.matchQuery("remark",con));
@@ -85,7 +86,7 @@
         boolQueryBuilder.should(QueryBuilders.matchQuery("by4",con));
         boolQueryBuilder.should(QueryBuilders.matchQuery("by6",con));
         boolQueryBuilder.should(QueryBuilders.matchQuery("by7",con));
-        boolQueryBuilder.filter(QueryBuilders.termsQuery("fid", idList));
+
 
         NativeSearchQueryBuilder nativeSearchQueryBuilder = new NativeSearchQueryBuilder()
                 .withQuery(boolQueryBuilder);
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZPropertyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZPropertyServiceImpl.java
index bd144ca..ed5d32b 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZPropertyServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZPropertyServiceImpl.java
@@ -63,7 +63,8 @@
         lqw.eq(userId != null, ZProperty::getUserId, userId)
                 .like(StringUtils.isNotEmpty(zProperty.getType()), ZProperty::getType, zProperty.getType())
                 .like(StringUtils.isNotEmpty(zProperty.getIncomeName()), ZProperty::getIncomeName, zProperty.getIncomeName())
-                .like(StringUtils.isNotEmpty(zProperty.getType()), ZProperty::getType, zProperty.getType()).eq(zProperty.getIsChange()!=null,ZProperty::getIsChange,zProperty.getIsChange())
+                .like(StringUtils.isNotEmpty(zProperty.getType()), ZProperty::getType, zProperty.getType())
+                .like(StringUtils.isNotEmpty(zProperty.getIsChange()),ZProperty::getIsChange,zProperty.getIsChange())
                 .like(StringUtils.isNotEmpty(zProperty.getRemark()), ZProperty::getRemark, zProperty.getRemark())
                 .like(StringUtils.isNotEmpty(zProperty.getTimeLimit()),ZProperty::getTimeLimit,zProperty.getTimeLimit())
                 .between(zProperty.getHappenStartTime() != null && zProperty.getHappenEndTime() != null, ZProperty::getHappenTime, zProperty.getHappenStartTime(), zProperty.getHappenEndTime())

--
Gitblit v1.9.1