From 678005f179281dd6c99d85cf5759e93a4677c826 Mon Sep 17 00:00:00 2001 From: jager Date: Mon, 10 Jan 2022 16:13:14 +0800 Subject: [PATCH] m --- cmd/stock/main.go | 9 ++++++--- user/cache.go | 3 --- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/stock/main.go b/cmd/stock/main.go index 90ca4bd..29bbfde 100644 --- a/cmd/stock/main.go +++ b/cmd/stock/main.go @@ -90,11 +90,14 @@ func main() { fund.Clear() msg_ := fund.FundsMsg(user.Codes(true)...) - err = msg.Send(msg_) - if err != nil { - logx.Errorf("fund msg send err: %v", err) + if msg_ != "" { + err = msg.Send(msg_) + if err != nil { + logx.Errorf("fund msg send err: %v", err) + } } + user.ForEachUser(func(u *user.User) bool { if u.IsStop() { return true diff --git a/user/cache.go b/user/cache.go index 7fd24f2..c075873 100644 --- a/user/cache.go +++ b/user/cache.go @@ -78,9 +78,6 @@ func ForEachUser(f func(u *User) bool) { func Codes(isFund bool) []string { var codes = map[string]struct{}{} ForEachUser(func(u *User) bool { - if u.IsStop() { - return true - } cds := u.Codes(isFund) for _, cd := range cds { if _, ok := codes[cd]; ok {