notify.go 449 B

123456789101112131415161718
  1. package block
  2. import (
  3. "context"
  4. "strconv"
  5. "go-common/app/admin/main/member/model/block"
  6. "github.com/pkg/errors"
  7. )
  8. func (s *Service) accountNotify(c context.Context, mid int64) (err error) {
  9. msg := &block.AccountNotify{UID: mid, Action: "blockUser"}
  10. if err = s.accountNotifyPub.Send(c, strconv.FormatInt(msg.UID, 10), msg); err != nil {
  11. err = errors.Errorf("mid(%d) s.accountNotify.Send(%+v) error(%+v)", msg.UID, msg, err)
  12. }
  13. return
  14. }