fix(stock): 统计涨跌时过滤真停牌股,同步日志记录拉取数量
This commit is contained in:
@@ -3,6 +3,7 @@ package services
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -87,6 +88,9 @@ func (s *StockSyncService) doSync(ctx context.Context) (int, error) {
|
||||
return 0, fmt.Errorf("no quotes returned")
|
||||
}
|
||||
|
||||
log.Printf("[stock sync] fetched %d stock quotes from CN_Equity_A, %d index quotes, total %d",
|
||||
len(stockQuotes), len(indexQuotes), len(quotes))
|
||||
|
||||
// 3. 归一化并写入 DB
|
||||
records := make([]models.StockDailyQuote, 0, len(quotes))
|
||||
for _, q := range quotes {
|
||||
|
||||
Reference in New Issue
Block a user