Просмотр исходного кода

Merge branch 'dev_v1.1.63_wh' of BaseService/jyMicroservices into feature/v1.1.63

王浩 7 месяцев назад
Родитель
Сommit
6f19ddb4f1
1 измененных файлов с 8 добавлено и 6 удалено
  1. 8 6
      jyBXCore/rpc/service/operator.go

+ 8 - 6
jyBXCore/rpc/service/operator.go

@@ -627,12 +627,14 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}, int64) {
 				subtype = append(subtype, gconv.String(v1))
 			}
 		}
-		if len(topType) > 0 {
-			filterArr = append(filterArr, fmt.Sprintf(`{"match":{"toptype":"%s"}}`, strings.Join(topType, `","`)))
-		}
-		//信息类型二级
-		if len(subtype) > 0 {
-			filterArr = append(filterArr, fmt.Sprintf(`{"terms":{"subtype":["%s"]}}`, strings.Join(subtype, `","`)))
+		if len(topType) == 1 {
+			if len(topType) > 0 {
+				filterArr = append(filterArr, fmt.Sprintf(`{"match":{"toptype":"%s"}}`, strings.Join(topType, `","`)))
+			}
+			//信息类型二级
+			if len(subtype) > 0 {
+				filterArr = append(filterArr, fmt.Sprintf(`{"terms":{"subtype":["%s"]}}`, strings.Join(subtype, `","`)))
+			}
 		}
 	}
 	//私有标签1