zwxi 5 months ago
parent
commit
3efe59e651
1 changed files with 6 additions and 0 deletions
  1. 6 0
      controllers/hisugar_data.go

+ 6 - 0
controllers/hisugar_data.go

@@ -899,6 +899,7 @@ func (this *TradeCommonController) HisugarIndexData() {
 		return
 	}
 	frequency := this.GetString("Frequency")
+	indexCode := this.GetString("IndexCode")
 
 	// 获取指标
 	var condition string
@@ -920,6 +921,11 @@ func (this *TradeCommonController) HisugarIndexData() {
 		pars = append(pars, frequency)
 	}
 
+	if indexCode != "" {
+		condition += ` AND index_code=? `
+		pars = append(pars, indexCode)
+	}
+
 	indexes, err := data_manage.GetHisugarIndex(condition, pars)
 	if err != nil {
 		br.Msg = "获取数据失败"