blocked.go 367 B

123456789101112131415161718192021222324
  1. package service
  2. import (
  3. "context"
  4. )
  5. var (
  6. rageMap = map[int16]string{
  7. 1: "S",
  8. 2: "A",
  9. 3: "B",
  10. 4: "C",
  11. }
  12. )
  13. // BlockedKPIInfo .
  14. func (s *Service) BlockedKPIInfo(c context.Context, mid int64, rage int16) (err error) {
  15. if len(rageMap[rage]) != 0 {
  16. s.figureDao.BlockedRage(c, mid, rage)
  17. } else {
  18. s.figureDao.BlockedRage(c, mid, int16(0))
  19. }
  20. return
  21. }