// Package service /** * @ File: * @ Date: 2021/4/26 11:15 * @ Author: JYQ * @ Description: 课程管理,包含课程表模板,课程表实例 */ package service import ( "sportfitness/base/assembly/base/repository/postgre" "sportfitness/base/errors" ) type Class struct { base } func (c Class) ClassQuery(token string, objectShopId int64, jsonStr string, sign string) string { optId := c.checkPermission(token, objectShopId) rst, err := postgre.PGClass{}.ClassQuery(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (c Class) ClassAdd(token string, objectShopId int64, jsonStr string, sign string) string { optId := c.checkPermission(token, objectShopId) rst, err := postgre.PGClass{}.ClassAdd(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (c Class) ClassEdit(token string, objectShopId int64, jsonStr string, sign string) string { optId := c.checkPermission(token, objectShopId) rst, err := postgre.PGClass{}.ClassEdit(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (c Class) ClassStatusEdit(token string, objectShopId int64, jsonStr string, sign string) string { optId := c.checkPermission(token, objectShopId) rst, err := postgre.PGClass{}.ClassStatusEdit(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (c Class) ClassColorEdit(token string, objectShopId int64, jsonStr string, sign string) string { optId := c.checkPermission(token, objectShopId) rst, err := postgre.PGClass{}.ClassColorEdit(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (c Class) ClassWxVisibleEdit(token string, objectShopId int64, jsonStr string, sign string) string { optId := c.checkPermission(token, objectShopId) rst, err := postgre.PGClass{}.ClassVisibleStatusEdit(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (c Class) ClassVipEdit(token string, objectShopId int64, jsonStr string, sign string) string { optId := c.checkPermission(token, objectShopId) rst, err := postgre.PGClass{}.ClassVipUserEdit(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst }