notify.go 544 B

123456789101112131415161718
  1. package service
  2. import (
  3. "context"
  4. "strconv"
  5. "go-common/app/job/main/usersuit/model"
  6. "go-common/library/log"
  7. )
  8. func (s *Service) accNotify(c context.Context, uid int64, Action string) (err error) {
  9. msg := &model.AccountNotify{UID: uid, Type: "update", Action: Action}
  10. if err = s.accountNotifyPub.Send(c, strconv.FormatInt(msg.UID, 10), msg); err != nil {
  11. log.Error("mid(%d) s.accountNotifyPub.Send(%+v,%s) error(%v)", msg.UID, msg, Action, err)
  12. }
  13. log.Info("mid(%d) s.accountNotifyPub.Send(%+v,%s)", msg.UID, msg, Action)
  14. return
  15. }