Browse Source

根据频度搜索指标数据

xyxie 6 months ago
parent
commit
b9c6dea499
1 changed files with 6 additions and 2 deletions
  1. 6 2
      controllers/data_manage/ccf_data.go

+ 6 - 2
controllers/data_manage/ccf_data.go

@@ -115,7 +115,8 @@ func (this *EdbInfoController) CCFIndexData() {
 		br.ErrMsg = "请选择分类"
 		br.ErrMsg = "请选择分类"
 		return
 		return
 	}
 	}
-
+	// 增加频度请求入参
+	frequency := this.GetString("Frequency")
 	// 获取指标
 	// 获取指标
 	var condition string
 	var condition string
 	var pars []interface{}
 	var pars []interface{}
@@ -123,7 +124,10 @@ func (this *EdbInfoController) CCFIndexData() {
 		condition += ` AND classify_id=? `
 		condition += ` AND classify_id=? `
 		pars = append(pars, classifyId)
 		pars = append(pars, classifyId)
 	}
 	}
-
+	if frequency != "" {
+		condition += ` AND frequency=? `
+		pars = append(pars, frequency)
+	}
 	indexes, err := data_manage.GetCCFIndex(condition, pars)
 	indexes, err := data_manage.GetCCFIndex(condition, pars)
 	if err != nil {
 	if err != nil {
 		br.Msg = "获取数据失败"
 		br.Msg = "获取数据失败"