This commit is contained in:
yanweidong
2026-01-26 02:39:26 +08:00
parent cc4f8184e1
commit 44d1a93789
2 changed files with 7 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ import (
func main() {
a.NewApiClient()
reply, err := a.SetFinaIndicator("000012.SZ", "20230101")
reply, err := a.SetFinaIndicator("000029.SZ", "20230331")
fmt.Println("Err", err)
jsonBytes, _ := json.Marshal(reply.Data.Items)
fmt.Println("Reply", string(jsonBytes))

View File

@@ -67,6 +67,12 @@ func ReFinaIndicator(in *tushare.APIResponse) (bool, map[string]any) {
func GetFinaIndicator() {
for _, code := range GetStockCodes() {
var fCnt int64
impl.DBService.Model(&models.StockFinaIndicator{}).Where("ts_code=?", code).Count(&fCnt)
if fCnt >= 11 {
continue
}
for _, period := range PeriodArgs {
// 请求API
reply, err := SetFinaIndicator(code, period)