Merge pull request 'by Robin at 20240302' (#156) from feat-IRONFANS-61-Robin into main
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/156
This commit is contained in:
commit
fe3e1c35be
|
@ -290,7 +290,7 @@ func (s *CronService) SendContactCustomerServicesOfLastMinute(ctx context.Contex
|
|||
return err.Error()
|
||||
}
|
||||
|
||||
err = dingtalk.SendMsgToAll(msg)
|
||||
err = dingtalk.SendMsg(msg)
|
||||
if err != nil {
|
||||
return err.Error()
|
||||
}
|
||||
|
|
|
@ -18,6 +18,16 @@ func NewDingTalkCilent(cfg *configcenter.DingTalkRobotConfig) *dingtalk.Client {
|
|||
return client
|
||||
}
|
||||
|
||||
func SendMsg(message string) error {
|
||||
msg := dingtalk.NewTextMessage().SetContent(message)
|
||||
_, _, err := defaultDingTalkClient.Send(msg)
|
||||
if err != nil {
|
||||
logger.Error("SendMsgToAll fail, err: %v", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func SendMsgToAll(message string) error {
|
||||
msg := dingtalk.NewTextMessage().SetContent(message).SetAt(nil, true)
|
||||
_, _, err := defaultDingTalkClient.Send(msg)
|
||||
|
|
Loading…
Reference in New Issue