Skip to content

Commit

Permalink
调整日志级别
Browse files Browse the repository at this point in the history
  • Loading branch information
axiaoxin committed Jul 24, 2021
1 parent 3a08b25 commit 79d7044
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (s Selector) AutoFilterStocks(ctx context.Context) (result models.StockList
result = append(result, stock)
mu.Unlock()
} else {
logging.Info(ctx, fmt.Sprintf("%s %s has some defects", stock.BaseInfo.SecurityNameAbbr, stock.BaseInfo.Secucode), zap.Any("details", details))
logging.Debug(ctx, fmt.Sprintf("%s %s has some defects", stock.BaseInfo.SecurityNameAbbr, stock.BaseInfo.Secucode), zap.Any("details", details))
}
}
}(ctx, baseInfo)
Expand Down
3 changes: 3 additions & 0 deletions models/fund.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,9 @@ func (f Fund) NetAssetsScaleHuman() string {

// EstabYears 成立年限
func (f Fund) EstabYears(ctx context.Context) float64 {
if f.EstablishedDate == "--" {
return 0
}
date, err := time.Parse("2006-01-02", f.EstablishedDate)
if err != nil {
logging.Errorf(ctx, "EstabYears parse date err:%v", err)
Expand Down
4 changes: 2 additions & 2 deletions models/stock.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func NewStock(ctx context.Context, baseInfo eastmoney.StockInfo) (Stock, error)
}()
pps, err := datacenter.EastMoney.QueryProfitPredict(ctx, s.BaseInfo.Secucode)
if err != nil {
logging.Warn(ctx, "NewStock QueryProfitPredict err:"+err.Error())
logging.Debug(ctx, "NewStock QueryProfitPredict err:"+err.Error())
return
}
s.ProfitPredictList = pps
Expand All @@ -251,7 +251,7 @@ func NewStock(ctx context.Context, baseInfo eastmoney.StockInfo) (Stock, error)
}()
jzpg, err := datacenter.EastMoney.QueryJiaZhiPingGu(ctx, s.BaseInfo.Secucode)
if err != nil {
logging.Error(ctx, "NewStock QueryJiaZhiPingGu err:"+err.Error())
logging.Debug(ctx, "NewStock QueryJiaZhiPingGu err:"+err.Error())
return
}
s.JZPG = jzpg
Expand Down

0 comments on commit 79d7044

Please sign in to comment.