| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- // 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
- }
|