forbid.go 604 B

12345678910111213141516171819202122232425
  1. package service
  2. import (
  3. "context"
  4. "go-common/library/log"
  5. )
  6. // SetLock set click lock by plat and lv
  7. func (s *Service) SetLock(c context.Context, aid int64, plat, lock, lv int8) (err error) {
  8. if _, err = s.db.UpForbid(c, aid, plat, lock, lv); err != nil {
  9. log.Error("s.db.UpForbid(%+v) error(%v)", c, err)
  10. return
  11. }
  12. return
  13. }
  14. // SetMidForbid is
  15. func (s *Service) SetMidForbid(c context.Context, mid int64, status int8) (err error) {
  16. if err = s.db.UpMidForbidStatus(c, mid, status); err != nil {
  17. log.Error("s.db.UpMidForbidStatus(%d, %d) error(%v)", mid, status, err)
  18. return
  19. }
  20. return
  21. }