event.go 939 B

1234567891011121314151617181920212223242526272829
  1. package service
  2. import (
  3. "context"
  4. "go-common/app/admin/main/reply/model"
  5. "go-common/library/log"
  6. )
  7. func (s *Service) pubEvent(c context.Context, action string, mid int64, sub *model.Subject, rp *model.Reply, rpt *model.Report) (err error) {
  8. if err = s.dao.PubEvent(c, action, mid, sub, rp, rpt); err != nil {
  9. log.Error("s.dao.PubEvent(%s,%d,%v,%v,%v) error(%v)", action, mid, sub, rp, rpt, err)
  10. }
  11. return
  12. }
  13. func (s *Service) pubSearchReply(c context.Context, rps map[int64]*model.Reply, newState int32) (err error) {
  14. if err = s.dao.UpSearchReply(c, rps, newState); err != nil {
  15. log.Error("s.dao.UpSearchReply(%v,%d) error(%v)", rps, newState, err)
  16. }
  17. return
  18. }
  19. func (s *Service) pubSearchReport(c context.Context, rpts map[int64]*model.Report, rpState *int32) (err error) {
  20. if err = s.dao.UpSearchReport(c, rpts, rpState); err != nil {
  21. log.Error("s.dao.UpSearchReport(%v,%d) error(%v)", rpts, rpState, err)
  22. }
  23. return
  24. }