From a918f612c553f25df12ec6717f6ef8846914bc55 Mon Sep 17 00:00:00 2001
From: xiaozhequ <792962424@qq.com>
Date: Thu, 19 Oct 2023 23:15:15 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E4=B8=8D=E5=87=BA=E4=BE=8B=E5=A4=96=E4=BA=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../elasticsearc/CourseElasticsearchImpl.java | 7 ++--
servers/boe-server-all/pom.xml | 34 +++++++++----------
2 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/modules/boe-module-es/src/main/java/com/xboe/module/elasticsearc/CourseElasticsearchImpl.java b/modules/boe-module-es/src/main/java/com/xboe/module/elasticsearc/CourseElasticsearchImpl.java
index 473e6951..a73e0f8e 100644
--- a/modules/boe-module-es/src/main/java/com/xboe/module/elasticsearc/CourseElasticsearchImpl.java
+++ b/modules/boe-module-es/src/main/java/com/xboe/module/elasticsearc/CourseElasticsearchImpl.java
@@ -371,7 +371,7 @@ public class CourseElasticsearchImpl implements ICourseFullTextSearch{
//查询出例外人员创建的课程
if(params.getSysCreateAids()!=null && params.getSysCreateAids().length>0) {
BoolQueryBuilder exception =QueryBuilders.boolQuery();
- exception.must(QueryBuilders.termQuery("sysCreateAid",params.getSysCreateAids()));
+ exception.must(QueryBuilders.termsQuery("sysCreateAid",params.getSysCreateAids()));
audience.should(exception);
}
audience.should(has);
@@ -382,9 +382,10 @@ public class CourseElasticsearchImpl implements ICourseFullTextSearch{
//如果当前用户无受众,只能查询未设置受众的课程
boolQuery.should(QueryBuilders.termQuery("isSetAudience",0));
if(params.getSysCreateAids()!=null && params.getSysCreateAids().length>0) {
- boolQuery.should(QueryBuilders.termQuery("sysCreateAid",params.getSysCreateAids()));
-
+ boolQuery.should(QueryBuilders.termsQuery("sysCreateAid",params.getSysCreateAids()));
}
+
+
}
}
diff --git a/servers/boe-server-all/pom.xml b/servers/boe-server-all/pom.xml
index e0406c88..37247eb9 100644
--- a/servers/boe-server-all/pom.xml
+++ b/servers/boe-server-all/pom.xml
@@ -17,26 +17,26 @@
1.8
2021.0.5
2021.0.5.0
- 2.2.0
+
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
- ${spring-cloud-alibaba.version}
-
-
- com.alibaba.nacos
- nacos-client
-
-
-
-
- com.alibaba.nacos
- nacos-client
- ${nacos-client.version}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
org.apache.poi
From 2cc74026bf7d00a1f404ea8ed5f3eb13bbb77afa Mon Sep 17 00:00:00 2001
From: xiaozhequ <792962424@qq.com>
Date: Thu, 19 Oct 2023 23:24:14 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=9F=A5=E8=AF=A2?=
=?UTF-8?q?=E4=B8=8D=E5=87=BA=E4=BE=8B=E5=A4=96=E4=BA=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../xboe/module/elasticsearc/CourseElasticsearchImpl.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/boe-module-es/src/main/java/com/xboe/module/elasticsearc/CourseElasticsearchImpl.java b/modules/boe-module-es/src/main/java/com/xboe/module/elasticsearc/CourseElasticsearchImpl.java
index 473e6951..e99aa8e1 100644
--- a/modules/boe-module-es/src/main/java/com/xboe/module/elasticsearc/CourseElasticsearchImpl.java
+++ b/modules/boe-module-es/src/main/java/com/xboe/module/elasticsearc/CourseElasticsearchImpl.java
@@ -371,7 +371,7 @@ public class CourseElasticsearchImpl implements ICourseFullTextSearch{
//查询出例外人员创建的课程
if(params.getSysCreateAids()!=null && params.getSysCreateAids().length>0) {
BoolQueryBuilder exception =QueryBuilders.boolQuery();
- exception.must(QueryBuilders.termQuery("sysCreateAid",params.getSysCreateAids()));
+ exception.must(QueryBuilders.termsQuery("sysCreateAid",params.getSysCreateAids()));
audience.should(exception);
}
audience.should(has);
@@ -382,9 +382,9 @@ public class CourseElasticsearchImpl implements ICourseFullTextSearch{
//如果当前用户无受众,只能查询未设置受众的课程
boolQuery.should(QueryBuilders.termQuery("isSetAudience",0));
if(params.getSysCreateAids()!=null && params.getSysCreateAids().length>0) {
- boolQuery.should(QueryBuilders.termQuery("sysCreateAid",params.getSysCreateAids()));
-
+ boolQuery.should(QueryBuilders.termsQuery("sysCreateAid",params.getSysCreateAids()));
}
+ boolQuery.minimumShouldMatch(1);
}
}