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

+ 6 - 2
services/base_from_ths_ds.go

@@ -151,7 +151,9 @@ func getEdbDataFromThsDsApp(stockCode, edbCode, startDate, endDate string, num i
 
 				for k, v := range stockData {
 					if k != "time" && k != "thscode" {
-						tableValueList = append(tableValueList, v.(float64))
+						if v != nil {
+							tableValueList = append(tableValueList, v.(float64))
+						}
 					}
 				}
 			}
@@ -197,7 +199,9 @@ func getEdbDataFromThsDsApp(stockCode, edbCode, startDate, endDate string, num i
 
 			for k, v := range stockData {
 				if k != "time" && k != "thscode" {
-					tableValueList = append(tableValueList, v.(float64))
+					if v != nil {
+						tableValueList = append(tableValueList, v.(float64))
+					}
 				}
 			}
 		}