Browse Source

汾渭数据源对接-添加指标条件查询逻辑修改

gmy 7 months ago
parent
commit
23da18f077
1 changed files with 8 additions and 3 deletions
  1. 8 3
      controllers/data_manage/fenwei_data.go

+ 8 - 3
controllers/data_manage/fenwei_data.go

@@ -1018,9 +1018,14 @@ func (this *EdbInfoController) GetFenWeiIndexInfo() {
 	classifyIds := this.GetString("ClassifyIds")
 	frequencies := this.GetString("Frequencies")
 
-	classifyIdList := strings.Split(classifyIds, ",")
-	frequencyList := strings.Split(frequencies, ",")
-
+	var classifyIdList []string
+	var frequencyList []string
+	if classifyIds != "" {
+		classifyIdList = strings.Split(classifyIds, ",")
+	}
+	if frequencies != "" {
+		frequencyList = strings.Split(frequencies, ",")
+	}
 	indexInfoPage, err := data.GetFenWeiIndexInfo(keyWord, classifyIdList, frequencyList, currentIndex, pageSize)
 	if err != nil {
 		return