account_notify.go 410 B

12345678910111213141516171819202122
  1. package dao
  2. import (
  3. "context"
  4. "fmt"
  5. "go-common/app/job/main/member/model"
  6. )
  7. func notifyKey(mid int64) string {
  8. return fmt.Sprintf("MemberJob-AccountNotify-T%d", mid)
  9. }
  10. // NotifyPurgeCache is
  11. func (d *Dao) NotifyPurgeCache(c context.Context, mid int64, action string) error {
  12. msg := &model.NotifyInfo{
  13. Mid: mid,
  14. Action: action,
  15. }
  16. key := notifyKey(mid)
  17. return d.accNotify.Send(c, key, msg)
  18. }