xyxie 9 месяцев назад
Родитель
Сommit
f2e9bc9090
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      services/data/future_good/chart_info.go

+ 5 - 5
services/data/future_good/chart_info.go

@@ -698,8 +698,8 @@ func handleResultData(regionType string, futureGoodEdbType, baseEdbLen int, yDat
 			tmpNList := nList
 
 			//当前的主力合约
-			newYDataList[yIndex].XEdbInfoIdList = append(newYDataList[yIndex].XEdbInfoIdList, yData.XEdbInfoIdList[0:baseEdbLen-1]...)
-			newYDataList[yIndex].Value = append(newYDataList[yIndex].Value, yData.Value[0:baseEdbLen-1]...)
+			newYDataList[yIndex].XEdbInfoIdList = append(newYDataList[yIndex].XEdbInfoIdList, yData.XEdbInfoIdList[0:baseEdbLen]...)
+			newYDataList[yIndex].Value = append(newYDataList[yIndex].Value, yData.Value[0:baseEdbLen]...)
 
 			xEdbInfoIdList := yData.XEdbInfoIdList[baseEdbLen:]
 			valIndex := baseEdbLen
@@ -775,7 +775,7 @@ func handleResultData(regionType string, futureGoodEdbType, baseEdbLen int, yDat
 		//v.XEdbInfoIdList
 		for edbInfoIndex, edbInfoId := range v.XEdbInfoIdList {
 			// 现货指标不处理
-			if edbInfoIndex >= baseEdbLen-1 {
+			if edbInfoIndex <= baseEdbLen-1 {
 				continue
 			}
 
@@ -814,8 +814,8 @@ func handleResultData(regionType string, futureGoodEdbType, baseEdbLen int, yDat
 		tmpNList := nList
 
 		//当前的主力合约
-		newYDataList[yIndex].XEdbInfoIdList = append(newYDataList[yIndex].XEdbInfoIdList, yData.XEdbInfoIdList[0:baseEdbLen-1]...)
-		newYDataList[yIndex].Value = append(newYDataList[yIndex].Value, yData.Value[0:baseEdbLen-1]...)
+		newYDataList[yIndex].XEdbInfoIdList = append(newYDataList[yIndex].XEdbInfoIdList, yData.XEdbInfoIdList[0:baseEdbLen]...)
+		newYDataList[yIndex].Value = append(newYDataList[yIndex].Value, yData.Value[0:baseEdbLen]...)
 
 		xEdbInfoIdList := yData.XEdbInfoIdList[baseEdbLen:]
 		currDataTime := yData.ConfigDate