瀏覽代碼

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

gmy 7 月之前
父節點
當前提交
23da18f077
共有 1 個文件被更改,包括 8 次插入3 次删除
  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