zwxi 1 年之前
父节点
当前提交
453c0612f9
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      services/base_from_ths_ds.go

+ 2 - 1
services/base_from_ths_ds.go

@@ -125,6 +125,7 @@ func getEdbDataFromThsDsApp(stockCode, edbCode, startDate, endDate string, num i
 		//var responses []TerminalResponse
 
 		for _, data := range jsonArray {
+			data = strings.Replace(data, "NaN", "null", -1)
 			tableTimeList := make([]string, 0)
 			tableValueList := make([]float64, 0)
 			var response TerminalResponse
@@ -172,7 +173,7 @@ func getEdbDataFromThsDsApp(stockCode, edbCode, startDate, endDate string, num i
 		}
 		// 解码数组内的每个 JSON 字符串
 		//var responses []TerminalResponse
-
+		data = strings.Replace(data, "NaN", "null", -1)
 		tableTimeList := make([]string, 0)
 		tableValueList := make([]float64, 0)
 		var response TerminalResponse