@@ -0,0 +1,32 @@
+// Package service
+/**
+ * @ File: hrRedis.go
+ * @ Date: 2021/6/9 15:07
+ * @ Author: JYQ
+ * @ Description: 心率相关Redis操作
+ */
+package service
+
+import (
+ "sportfitness/base/assembly/heartRate/repository/postgre"
+ "sportfitness/base/errors"
+)
+type HrRedis struct {
+ base
+}
+// ClassStartR1AndOnClassByUUStdID 确认上课时创建R1与OnClass
+func (h HrRedis) ClassStartR1AndOnClassByUUStdID(token string, objectShopId int64, uuid string) string {
+ optId := h.checkPermission(token, objectShopId)
+ rst, err := postgre.PGHr{}.GetStdInfoAndCrIdByUUStdID(optId, objectShopId, uuid)
+ if err != nil {
+ panic(errors.PGError)
+ }
+ if !h.checkRs(rst) {
+ return rst
@@ -17,6 +17,7 @@ type HrVerify struct {
HeadImg string `json:"head_img"`
Name string `json:"name"`
IsPrivate int `json:"is_private"`
+ GroupNo int `json:"group_no"`
}
type HrVerifyDetail struct {
@@ -207,3 +207,10 @@ func (p PGHr) trySaveHrSaveMap() {
+func (PGHr) GetStdInfoAndCrIdByUUStdID(optUserId int64, objectShopId int64, uuid string) (result string, err error) {
+ //err = getClient().Raw("select fn_hr_sensors_public_sensors_query(? ,? ,?, ? )", optUserId, objectShopId, jsonStr, verfStr).
+ // Scan(&result).Error
+ //
+ return