fix bug
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
a.NewApiClient()
|
a.NewApiClient()
|
||||||
reply, err := a.SetFinaIndicator("000012.SZ", "20230101")
|
reply, err := a.SetFinaIndicator("000029.SZ", "20230331")
|
||||||
fmt.Println("Err", err)
|
fmt.Println("Err", err)
|
||||||
jsonBytes, _ := json.Marshal(reply.Data.Items)
|
jsonBytes, _ := json.Marshal(reply.Data.Items)
|
||||||
fmt.Println("Reply", string(jsonBytes))
|
fmt.Println("Reply", string(jsonBytes))
|
||||||
|
|||||||
@@ -67,6 +67,12 @@ func ReFinaIndicator(in *tushare.APIResponse) (bool, map[string]any) {
|
|||||||
|
|
||||||
func GetFinaIndicator() {
|
func GetFinaIndicator() {
|
||||||
for _, code := range GetStockCodes() {
|
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 {
|
for _, period := range PeriodArgs {
|
||||||
// 请求API
|
// 请求API
|
||||||
reply, err := SetFinaIndicator(code, period)
|
reply, err := SetFinaIndicator(code, period)
|
||||||
|
|||||||
Reference in New Issue
Block a user