Browse Source

fix:跨品种分析图表,指标来源

Roc 1 year ago
parent
commit
4f3623c031
1 changed files with 6 additions and 0 deletions
  1. 6 0
      controllers/chart_common.go

+ 6 - 0
controllers/chart_common.go

@@ -503,12 +503,18 @@ func GetCrossVarietyChartInfoDetailFromUniqueCode(chartInfo *models.ChartInfo, k
 	resp.DataResp = dataResp
 	resp.EdbInfoList = edbList
 
+	// 图表的指标来源
+	sourceNameList, sourceNameEnList := data.GetEdbSourceByEdbInfoIdList(edbList)
+	chartInfo.ChartSource = strings.Join(sourceNameList, ",")
+	chartInfo.ChartSourceEn = strings.Join(sourceNameEnList, ",")
+
 	// 将数据加入缓存
 	if utils.Re == nil {
 		d, _ := json.Marshal(resp)
 		_ = utils.Rc.Put(key, d, 2*time.Hour)
 	}
 	isOk = true
+
 	return
 }