From 31b53ed4e328090798dae35cecc9f5a60cdccd67 Mon Sep 17 00:00:00 2001
From: zqy <2522236926@qq.com>
Date: 星期三, 21 一月 2026 18:10:39 +0800
Subject: [PATCH] 修改人物搜索bug
---
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java | 12 ++++--
zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java | 12 ++++--
zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java | 12 ++++--
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java | 12 ++++--
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java | 17 ++++++--
ruoyi-common/src/main/java/com/ruoyi/common/config/ElasticSearchConfig.java | 1
zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java | 13 ++++--
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java | 12 ++++-
zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java | 12 ++++--
zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java | 12 ++++--
10 files changed, 79 insertions(+), 36 deletions(-)
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/config/ElasticSearchConfig.java b/ruoyi-common/src/main/java/com/ruoyi/common/config/ElasticSearchConfig.java
index 1b01eba..828d2d7 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/config/ElasticSearchConfig.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/config/ElasticSearchConfig.java
@@ -36,6 +36,7 @@
"localhost",
8087,
+
"http"
)
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
index 29c4ca9..cf88bbc 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
@@ -108,9 +108,13 @@
.isNull(ZfProperty::getIsHide)
);
}
- if (zfProperty.getHasAttachment() != null && zfProperty.getHasAttachment().equals("鏄�")) {
- lqw.apply("url IS NOT NULL AND url != ''");
- }
+ if (zfProperty.getHasAttachment() != null) {
+ if (zfProperty.getHasAttachment().equals("鏄�")) {
+ lqw.apply("url IS NOT NULL AND url != ''");
+ }
+ else {
+ lqw.apply("(url IS NULL OR url = '')");
+ } }
// lqw.in(StringUtils.isNotEmpty(zfEconomy.getCompanionList()),ZfEconomy::getCompanion,zfEconomy.getCompanionList());
// if (zfEconomy.getYear() != 0) {
// System.out.println("pppppppppppppppppppppppppppppppppppppppppppppppppppp"+zfEconomy.getYear());
@@ -130,7 +134,7 @@
if (!companionList.isEmpty()) {
// 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
for (String companion : companionList) {
- lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), '锛�', ',')) > 0",
+ lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(REPLACE(people, ' ', ''), '锛�', ','),';',',')) > 0",
companion);
}
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java
index 16ea477..4dd914b 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/TravelCountServiceImpl.java
@@ -237,9 +237,13 @@
.isNull(TravelCount::getIsHide)
);
}
- if (travelCount.getHasAttachment() != null && travelCount.getHasAttachment().equals("鏄�")) {
- lqw.apply("url IS NOT NULL AND url != ''");
- }
+ if (travelCount.getHasAttachment() != null) {
+ if (travelCount.getHasAttachment().equals("鏄�")) {
+ lqw.apply("url IS NOT NULL AND url != ''");
+ }
+ else {
+ lqw.apply("(url IS NULL OR url = '')");
+ } }
// lqw.in(StringUtils.isNotEmpty(travelCount.getCompanionList()),travelCount::getCompanion,travelCount.getCompanionList());
// if (travelCount.getYear() != 0) {
// System.out.println("pppppppppppppppppppppppppppppppppppppppppppppppppppp"+travelCount.getYear());
@@ -259,7 +263,7 @@
if (!companionList.isEmpty()) {
// 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
for (String companion : companionList) {
- lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), '锛�', ',')) > 0",
+ lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(REPLACE(people, ' ', ''), '锛�', ','),';',',')) > 0",
companion);
}
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java
index 080b075..872aa5e 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCleanServiceImpl.java
@@ -92,9 +92,13 @@
.isNull(ZfClean::getIsHide)
);
}
- if (zfClean.getHasAttachment() != null && zfClean.getHasAttachment().equals("鏄�")) {
- lqw.apply("url IS NOT NULL AND url != ''");
- }
+ if (zfClean.getHasAttachment() != null) {
+ if (zfClean.getHasAttachment().equals("鏄�")) {
+ lqw.apply("url IS NOT NULL AND url != ''");
+ }
+ else {
+ lqw.apply("(url IS NULL OR url = '')");
+ } }
// lqw.in(StringUtils.isNotEmpty(zfClean.getCompanionList()),zfClean::getCompanion,zfClean.getCompanionList());
// if (zfClean.getYear() != 0) {
// System.out.println("pppppppppppppppppppppppppppppppppppppppppppppppppppp"+zfClean.getYear());
@@ -114,7 +118,7 @@
if (!companionList.isEmpty()) {
// 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
for (String companion : companionList) {
- lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), '锛�', ',')) > 0",
+ lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(REPLACE(people, ' ', ''), '锛�', ','),';',',')) > 0",
companion);
}
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
index 62d8e8b..fc1b493 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfCollectionServiceImpl.java
@@ -93,9 +93,13 @@
.isNull(ZfCollection::getIsHide)
);
}
- if (zfCollection.getHasAttachment() != null && zfCollection.getHasAttachment().equals("鏄�")) {
- lqw.apply("url IS NOT NULL AND url != ''");
- }
+ if (zfCollection.getHasAttachment() != null) {
+ if (zfCollection.getHasAttachment().equals("鏄�")) {
+ lqw.apply("url IS NOT NULL AND url != ''");
+ }
+ else {
+ lqw.apply("(url IS NULL OR url = '')");
+ } }
// lqw.in(StringUtils.isNotEmpty(zfCollection.getCompanionList()),zfCollection::getCompanion,zfCollection.getCompanionList());
// if (zfCollection.getYear() != 0) {
// System.out.println("pppppppppppppppppppppppppppppppppppppppppppppppppppp"+zfCollection.getYear());
@@ -115,7 +119,7 @@
if (!companionList.isEmpty()) {
// 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
for (String companion : companionList) {
- lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(owner, ' ', ''), '锛�', ',')) > 0",
+ lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(REPLACE(people, ' ', ''), '锛�', ','),';',',')) > 0",
companion);
}
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
index b03f125..5f15720 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
@@ -475,10 +475,13 @@
.isNull(ZfDoctor::getIsHide)
);
}
- if (zfDoctor.getHasAttachment() != null && zfDoctor.getHasAttachment().equals("鏄�")) {
- lqw.apply("url IS NOT NULL AND url != ''");
- }// lqw.like(StringUtils.isNotEmpty(zfDoctor.getCompanion()),ZfDoctor::getCompanion,zfDoctor.getCompanion());
-
+ if (zfDoctor.getHasAttachment() != null) {
+ if (zfDoctor.getHasAttachment().equals("鏄�")) {
+ lqw.apply("url IS NOT NULL AND url != ''");
+ }
+ else {
+ lqw.apply("(url IS NULL OR url = '')");
+ } }
if (CollectionUtils.isNotEmpty(zfDoctor.getCompanionList())) {
List<String> companionList = zfDoctor.getCompanionList();
@@ -492,7 +495,7 @@
if (!companionList.isEmpty()) {
// 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
for (String companion : companionList) {
- lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), '锛�', ',')) > 0",
+ lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(REPLACE(people, ' ', ''), '锛�', ','),';',',')) > 0",
companion);
}
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java
index 0e63b93..34c2068 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEconomyServiceImpl.java
@@ -90,9 +90,13 @@
.isNull(ZfEconomy::getIsHide)
);
}
- if (zfEconomy.getHasAttachment() != null && zfEconomy.getHasAttachment().equals("鏄�")) {
- lqw.apply("url IS NOT NULL AND url != ''");
- }
+ if (zfEconomy.getHasAttachment() != null) {
+ if (zfEconomy.getHasAttachment().equals("鏄�")) {
+ lqw.apply("url IS NOT NULL AND url != ''");
+ }
+ else {
+ lqw.apply("(url IS NULL OR url = '')");
+ } }
// lqw.in(StringUtils.isNotEmpty(zfEconomy.getCompanionList()),ZfEconomy::getCompanion,zfEconomy.getCompanionList());
// if (zfEconomy.getYear() != 0) {
// System.out.println("pppppppppppppppppppppppppppppppppppppppppppppppppppp"+zfEconomy.getYear());
@@ -112,7 +116,7 @@
if (!companionList.isEmpty()) {
// 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
for (String companion : companionList) {
- lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), '锛�', ',')) > 0",
+ lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(REPLACE(people, ' ', ''), '锛�', ','),';',',')) > 0",
companion);
}
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
index 34b6632..ba854ec 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
@@ -87,8 +87,14 @@
.isNull(ZfEquipment::getIsHide)
);
}
- if (zfEquipment.getHasAttachment() != null && zfEquipment.getHasAttachment().equals("鏄�")) {
- lqw.apply("url IS NOT NULL AND url != ''");
+ if (zfEquipment.getHasAttachment() != null) {
+ if (zfEquipment.getHasAttachment().equals("鏄�")) {
+ lqw.apply("url IS NOT NULL AND url != ''");
+ }
+ else {
+ lqw.apply("(url IS NULL OR url = '')");
+ }
+
}
// lqw.in(StringUtils.isNotEmpty(zfEquipment.getCompanionList()),zfEquipment::getCompanion,zfEquipment.getCompanionList());
// if (zfEquipment.getYear() != 0) {
@@ -109,7 +115,7 @@
if (!companionList.isEmpty()) {
// 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
for (String companion : companionList) {
- lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), '锛�', ',')) > 0",
+ lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(REPLACE(people, ' ', ''), '锛�', ','),';',',')) > 0",
companion);
}
}
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
index 2d2aaf3..854e8ab 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java
@@ -85,8 +85,14 @@
lqw.like(!StringUtils.isEmpty(zfEvent.getPeople()), ZfEvent::getPeople, zfEvent.getPeople());
}
- if (zfEvent.getHasAttachment() != null && zfEvent.getHasAttachment().equals("鏄�")) {
- lqw.apply("url IS NOT NULL AND url != ''");
+ if (zfEvent.getHasAttachment() != null) {
+ if (zfEvent.getHasAttachment().equals("鏄�")) {
+ lqw.apply("url IS NOT NULL AND url != ''");
+ }
+ else {
+ lqw.apply("(url IS NULL OR url = '')");
+ }
+
}
// lqw.in(StringUtils.isNotEmpty(ZfEvent.getCompanionList()),ZfEvent::getCompanion,ZfEvent.getCompanionList());
// if (ZfEvent.getYear() != 0) {
@@ -107,8 +113,9 @@
if (!companionList.isEmpty()) {
// 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
for (String companion : companionList) {
+ System.out.println("[[[[["+companion);
lqw.apply(
- "FIND_IN_SET({0}, REPLACE(REPLACE(people, ' ', ''), '锛�', ',')) > 0",
+ "FIND_IN_SET({0}, REPLACE(REPLACE(REPLACE(people, ' ', ''), '锛�', ','),';',',')) > 0",
companion);
}
}
@@ -677,7 +684,9 @@
zfEvent.setHappenEndTime(happenEndTime);
System.out.println("--------------"+companion+"-----------------");
- String[] split = companion.trim().replace(" ", "").replace("锛�", ",").split(",");
+ String[] split = companion.trim().replace(" ", "").replace("锛�", ",").replace(";",",").split(",");
+
+ System.out.println(Arrays.toString(split));
List<String> list = Arrays.asList(split);
zfEvent.setCompanionList(list);
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
index e8590d3..58eeff0 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
@@ -385,9 +385,13 @@
.isNull(ZfPet::getIsHide)
);
}
- if (zfPet.getHasAttachment() != null && zfPet.getHasAttachment().equals("鏄�")) {
- lqw.apply("url IS NOT NULL AND url != ''");
- }
+ if (zfPet.getHasAttachment() != null) {
+ if (zfPet.getHasAttachment().equals("鏄�")) {
+ lqw.apply("url IS NOT NULL AND url != ''");
+ }
+ else {
+ lqw.apply("(url IS NULL OR url = '')");
+ } }
// lqw.in(StringUtils.isNotEmpty(zfPet.getCompanionList()),zfPet::getCompanion,zfPet.getCompanionList());
// if (zfPet.getYear() != 0) {
// System.out.println("pppppppppppppppppppppppppppppppppppppppppppppppppppp"+zfPet.getYear());
@@ -407,7 +411,7 @@
if (!companionList.isEmpty()) {
// 纭繚鎵�鏈夊弬涓庝汉閮藉湪companion瀛楁涓�
for (String companion : companionList) {
- lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(companion, ' ', ''), '锛�', ',')) > 0",
+ lqw.apply("FIND_IN_SET({0}, REPLACE(REPLACE(REPLACE(people, ' ', ''), '锛�', ','),';',',')) > 0",
companion);
}
}
--
Gitblit v1.9.1