| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- // 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{}.OrderListQuery(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{}.OrderAdd(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{}.OrderCancel(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
- }
|