// Package service /** * @ File: * @ Date: 2021/4/26 11:19 * @ Author: JYQ * @ Description: 预约管理 */ package service import ( "sportfitness/base/assembly/base/repository/postgre" "sportfitness/base/errors" ) type Order struct { base } func (o Order) OrderListQuery(token string, objectShopId int64, jsonStr string, sign string) string { optId := o.checkPermission(token, objectShopId) rst, err := postgre.PGOrder{}.OrderListQueryByManager(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (o Order) OrderAddByManager(token string, objectShopId int64, jsonStr string, sign string) string { optId := o.checkPermission(token, objectShopId) rst, err := postgre.PGOrder{}.OrderAddByManager(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (o Order) OrderCancelByManager(token string, objectShopId int64, jsonStr string, sign string) string { optId := o.checkPermission(token, objectShopId) rst, err := postgre.PGOrder{}.OrderCancelByManager(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (o Order) OrderStatistics(token string, objectShopId int64, jsonStr string, sign string) string { optId := o.checkPermission(token, objectShopId) rst, err := postgre.PGOrder{}.OrderStatistics(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (o Order) ClassOrderQuery(token string, objectShopId int64, jsonStr string, sign string) string { optId := o.checkPermission(token, objectShopId) rst, err := postgre.PGOrder{}.ClassOrderQuery(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst } func (o Order) VipUserOrderQuery(token string, objectShopId int64, jsonStr string, sign string) string { optId := o.checkPermission(token, objectShopId) rst, err := postgre.PGOrder{}.VipUserOrderQuery(optId, objectShopId, jsonStr, sign) if err != nil { panic(errors.PGError) } return rst }