hrRedis.go 684 B

1234567891011121314151617181920212223242526272829303132
  1. // Package service
  2. /**
  3. * @ File: hrRedis.go
  4. * @ Date: 2021/6/9 15:07
  5. * @ Author: JYQ
  6. * @ Description: 心率相关Redis操作
  7. */
  8. package service
  9. import (
  10. "sportfitness/base/assembly/heartRate/repository/postgre"
  11. "sportfitness/base/errors"
  12. )
  13. type HrRedis struct {
  14. base
  15. }
  16. // ClassStartR1AndOnClassByUUStdID 确认上课时创建R1与OnClass
  17. func (h HrRedis) ClassStartR1AndOnClassByUUStdID(token string, objectShopId int64, uuid string) string {
  18. optId := h.checkPermission(token, objectShopId)
  19. rst, err := postgre.PGHr{}.GetStdInfoAndCrIdByUUStdID(optId, objectShopId, uuid)
  20. if err != nil {
  21. panic(errors.PGError)
  22. }
  23. if !h.checkRs(rst) {
  24. return rst
  25. }
  26. return rst
  27. }