fix bug
This commit is contained in:
@@ -24,10 +24,10 @@ func GetStockDaily() {
|
||||
"end_date": end,
|
||||
}
|
||||
|
||||
log.Println("GetStockDaily", code, start, end)
|
||||
if start == end {
|
||||
continue
|
||||
}
|
||||
|
||||
fields := []string{}
|
||||
reply, err := TushareClient.Daily(params, fields)
|
||||
if err != nil {
|
||||
@@ -62,7 +62,7 @@ func GetStockDaily() {
|
||||
}
|
||||
|
||||
if len(records) > 0 {
|
||||
impl.DBService.CreateInBatches(records, 100)
|
||||
impl.DBService.CreateInBatches(records, 50)
|
||||
}
|
||||
|
||||
time.Sleep(200 * time.Microsecond)
|
||||
|
||||
@@ -580,7 +580,7 @@ func UpdateFinaIndicator(code, period string, item map[string]any) {
|
||||
upd["q_netprofit_margin"] = Any2Float(item["q_netprofit_margin"])
|
||||
}
|
||||
if old.QGscaleprofitMargin != Any2Float(item["q_gsprofit_margin"]) {
|
||||
upd["q_gsprofit_margin"] = Any2Float(item["q_gsprofit_margin"])
|
||||
upd["q_gscaleprofit_margin"] = Any2Float(item["q_gsprofit_margin"])
|
||||
}
|
||||
if old.QExpToSales != Any2Float(item["q_exp_to_sales"]) {
|
||||
upd["q_exp_to_sales"] = Any2Float(item["q_exp_to_sales"])
|
||||
|
||||
Reference in New Issue
Block a user