fix bug
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
@@ -23,7 +24,7 @@ func main() {
|
||||
impl.NewImpl()
|
||||
|
||||
a.NewApiClient()
|
||||
code := "002463.SZ"
|
||||
code := "300541.SZ"
|
||||
end := time.Now().Format("20060102")
|
||||
|
||||
var start string = "20230101"
|
||||
@@ -38,6 +39,7 @@ func main() {
|
||||
"end_date": end,
|
||||
}
|
||||
|
||||
log.Println("GetStockDaily", code, start, end)
|
||||
fields := []string{}
|
||||
reply, err := a.TushareClient.Daily(params, fields)
|
||||
if err != nil {
|
||||
@@ -72,6 +74,7 @@ func main() {
|
||||
}
|
||||
|
||||
if len(records) > 0 {
|
||||
impl.DBService.CreateInBatches(records, 100)
|
||||
fmt.Println("Created", len(records))
|
||||
//impl.DBService.CreateInBatches(records, 100)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user