Ver Fonte

fix ths_ds_data

zwxi há 8 meses atrás
pai
commit
148781c46c
1 ficheiros alterados com 3 adições e 5 exclusões
  1. 3 5
      services/base_from_ths_ds_http.go

+ 3 - 5
services/base_from_ths_ds_http.go

@@ -80,17 +80,15 @@ func getEdbDataFromThsDsHttp(stockCode, edbCode, startDate, endDate, thsRefreshT
 					value := reflect.ValueOf(sliceValue.Index(i).Interface())
 					if value.Kind() == reflect.Float64 {
 						tableValue = value.Float()
-						if tableValue != 0 {
-							tableTimeList = append(tableTimeList, tmpItems.Tables[0].Time[i])
-							tableValueList = append(tableValueList, tableValue)
-						}
+						tableTimeList = append(tableTimeList, tmpItems.Tables[0].Time[i])
+						tableValueList = append(tableValueList, tableValue)
 					}
 				}
 			} else {
 				fmt.Printf("Field '%s' not found\n", field)
 			}
 			tmpTable := models.Tables{
-				ID:  []string{},
+				ID:    []string{},
 				Time:  tableTimeList,
 				Value: tableValueList,
 			}