Răsfoiți Sursa

fix:商品价格曲线日期取值问题修复

Roc 1 an în urmă
părinte
comite
07371f29a7
1 a modificat fișierele cu 4 adăugiri și 3 ștergeri
  1. 4 3
      services/chart/future_good/chart_info.go

+ 4 - 3
services/chart/future_good/chart_info.go

@@ -437,8 +437,9 @@ func BarChartData(edbInfoMapping *chartEdbMappingModel.ChartEdbInfoMappingList,
 			//	err = tmpErr
 			//	return
 			//}
-			tmpRealDateTime := findDateTime
-			tmpFindDataValue, tmpIsFind := edbDataMap[int(futureGoodMapping.FutureGoodEdbInfoID)][findDateTime.Format(utils.FormatDate)]
+			//tmpRealDateTime := findDateTime	// 按照配置找到的日期
+			tmpRealDateTime := realDateTime // 实际现货的日期
+			tmpFindDataValue, tmpIsFind := edbDataMap[int(futureGoodMapping.FutureGoodEdbInfoID)][tmpRealDateTime.Format(utils.FormatDate)]
 			yDataMap[int(futureGoodMapping.FutureGoodEdbInfoID)] = tmpFindDataValue
 
 			findDataList = append(findDataList, tmpFindDataValue)
@@ -504,7 +505,7 @@ func BarChartData(edbInfoMapping *chartEdbMappingModel.ChartEdbInfoMappingList,
 
 		yDataList = append(yDataList, chart_info.YData{
 			Date:           yDate,
-			ConfigDate:     findDateTime,
+			ConfigDate:     realDateTime,
 			Value:          findDataList,
 			NoDataEdbList:  noDataIdList,
 			XEdbInfoIdList: xEdbInfoIdList,