Parcourir la source

Merge branch 'bzq/knowledge_add_viewpoint' of eta_gn_server/eta_api into debug

baoziqiang il y a 2 mois
Parent
commit
54308f4e47
2 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 1 0
      controllers/knowledge/resource.go
  2. 2 2
      services/knowledge/es.go

+ 1 - 0
controllers/knowledge/resource.go

@@ -415,6 +415,7 @@ func (this *ResourceController) Search() {
 		classifyIdsInt,
 		sourceFromArr,
 		tagIdsInt,
+		isShowMe,
 		isIncludeFile,
 		isQueryRef,
 		startSize,

+ 2 - 2
services/knowledge/es.go

@@ -52,7 +52,7 @@ func EsBatchAddOrEditKnowledgeResource(list []*knowledge.KnowledgeResource) (err
 }
 
 // SearchChartInfoData 查询es中的图表数据
-func SearchKnowledgeResourceByEs(resourceType int, keywordStr string, showSysIds []int, myId int, classifyIds []int, sourceList []string, tagIds []int, isIncludeFile, isQueryRef bool, from, size int) (list []*knowledge.KnowledgeResource, total int64, err error) {
+func SearchKnowledgeResourceByEs(resourceType int, keywordStr string, showSysIds []int, myId int, classifyIds []int, sourceList []string, tagIds []int, isShowMe, isIncludeFile, isQueryRef bool, from, size int) (list []*knowledge.KnowledgeResource, total int64, err error) {
 	indexName := utils.EsKnowledgeResourceIndexName
 	list = make([]*knowledge.KnowledgeResource, 0)
 	defer func() {
@@ -79,7 +79,7 @@ func SearchKnowledgeResourceByEs(resourceType int, keywordStr string, showSysIds
 			},
 		})
 	}
-	if myId > 0 {
+	if myId > 0 && isShowMe {
 		mustMap = append(mustMap, map[string]interface{}{
 			"term": map[string]interface{}{
 				"AdminId": myId,