// Package service /** * @ File: * @ Date: 2021/5/6 17:44 * @ Author: JYQ * @ Description: */ package service import ( "sportfitness/base/assembly/heartRate/repository/postgre" "sportfitness/base/errors" ) type Hr struct { base } func (h Hr) HrSensorsPublicQuery(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.PublicSensorQuery(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) HrSensorsPvtQuery(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.PrivateSensorQuery(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) AddHrSensors(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.PublicSensorsAdd(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) AddPvtHrSensors(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.PrivateSensorsAdd(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) EditHrSensors(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.SensorsEdit(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) HrSensorsDel(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.SensorsDel(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) PKGroupChg(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.PkGroupChg(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) BindHrSensor(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.CrBind(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) UnBindHrSensor(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.CrUnBind(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) SelectHrSensors(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.UnBindSensorsQuery(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) AfterClassAddClassDetail(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.HrClassDetailStatusEdit(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) HrClassStartPrepare(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.HrClassStartPrepare(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) ClassStartPrepareEdit(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.ClassInfoEditBeforeStart(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) HrClassDetailAdd(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.HrClassDetailAdd(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) TmpClassDetailAdd(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.TmpClassDetailAdd(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) HrClassDetailDel(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.HrClassDetailDel(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) HrClassDetailStatusEdit(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.HrClassDetailStatusEdit(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) HrClassStartConfirm(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.HrClassStartConfirm(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (h Hr) HrClassGiveUpConfirm(token string, objectShopId int64, jsonStr string, sign string) string { optId := h.checkPermission(token, objectShopId) rst, err := postgre.PGHr{}.HrClassGiveUpConfirm(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst }