add dingtalk msg

This commit is contained in:
2021-12-27 18:40:28 +08:00
parent 11fe0d4ccb
commit fcf1c30128
2 changed files with 21 additions and 12 deletions

View File

@@ -88,6 +88,13 @@ 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)
}
user.ForEachUser(func(u *user.User) bool {
if u.IsStop() {
return true
@@ -157,6 +164,19 @@ func main() {
continue
}
st, err := stock.GetStocks(user.Codes(false)...)
if err != nil {
logx.Errorf("get stock err: %v", err)
}
msg_ := st.Msg()
if msg_ != "" {
err = msg.Send(msg_)
if err != nil {
logx.Errorf("msg send err: %v", err)
}
}
user.ForEachUser(func(u *user.User) bool {
if u.IsStop() {
return true