notify.go 460 B

1234567891011121314151617
  1. package service
  2. import (
  3. "context"
  4. "strconv"
  5. "go-common/app/admin/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) error(%v)", msg.UID, msg, err)
  12. }
  13. return
  14. }