Jelajahi Sumber

fix:期货数据日期取值的问题

Roc 1 tahun lalu
induk
melakukan
48f5051afe
1 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 3 2
      services/data/future_good/chart_info.go

+ 3 - 2
services/data/future_good/chart_info.go

@@ -480,8 +480,9 @@ func BarChartData(edbInfoMapping *data_manage.ChartEdbInfoMapping, futureGoodMap
 			//	err = tmpErr
 			//	return
 			//}
-			tmpRealDateTime := findDateTime
-			tmpFindDataValue, tmpIsFind := edbDataMap[futureGoodMapping.FutureGoodEdbInfoId][findDateTime.Format(utils.FormatDate)]
+			//tmpRealDateTime := findDateTime	// 按照配置找到的日期
+			tmpRealDateTime := realDateTime // 实际现货的日期
+			tmpFindDataValue, tmpIsFind := edbDataMap[futureGoodMapping.FutureGoodEdbInfoId][tmpRealDateTime.Format(utils.FormatDate)]
 			yDataMap[futureGoodMapping.FutureGoodEdbInfoId] = tmpFindDataValue
 
 			findDataList = append(findDataList, tmpFindDataValue)