reservation

package
v0.0.0-...-7a73484 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2021 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

***************************************** @Description: @Time : 2021/1/7 16:58 @Author :lixiaojun

******************************************

Index

Constants

View Source
const (
	//通用字段
	OTHER = 1 //其他  通用字段

	//健康状况
	HEALTH_FEVER  = 2 //发热
	HEALTH_COUGH  = 3 //咳嗽
	HEALTH_RESP   = 4 //呼吸道感染
	HEALTH_HEALTH = 0 //健康

	//疫情状况
	EPI_LIFE    = 2 //疫情发源地生活史
	EPI_TRAVEL  = 3 //疫情发源地旅游史
	EPI_CONTACT = 4 //疫情发源地接触史
	EPI_NO      = 0 //无疫情状况

	//交通方式
	TRAFFIC_BUS   = 2 //公交车
	TRAFFIC_METRO = 3 //地铁
	TRAFFIC_WALK  = 4 //步行
	TRAFFIC_TAXI  = 5 //出租车
	TRAFFIC_DRIVE = 6 //驾车

	//出行地点
	ADDRESS_COMPANY = 2 //公司
	ADDRESS_HOME    = 3 //家

	//预约设置状态
	Resvervation_Setting_Disable = 0 // 关闭
	Resvervation_Setting_Enable  = 1 // 开启
)
View Source
const (
	//类型
	CallTypeReservation = 0 // 1-预约
	CallTypeOrder       = 1 // 开单

	//预约状态
	ReservationStatusTimeOut     = 0 //超时
	ReservationStatusWaitConfirm = 1 //待确认
	ReservationStatusCanceled    = 2 //取消(用户/商家取消)
	ReservationStatusConfirmed   = 3 //待服务
	ReservationStatusOrdered     = 4 //待结算
	ReservationStatusCompleted   = 5 //已完成

	//预约类型
	ReservationTypeProduct = 0 //商品
	ReservationTypeSingle  = 1 //单项目
	ReservationTypeSm      = 2 //套餐
	ReservationTypeCard    = 3 //综合卡
	ReservationTypeHcard   = 4 //限时卡
	ReservationTypeNcard   = 5 //限次卡
	ReservationTypeHncard  = 6 //限时限次卡
	ReservationTypeRcard   = 7 //充值卡

	//预约人类型
	UserTypeNormal = 1 // 散客
	UserTypeMember = 2 // 会员

	//预约条目的有效性
	ReservationItemsVaild   = 0 // 有效
	ReservationItemsInvalid = 1 // 无效

	//取消类型
	CancelTypeUser = 1 //用户取消
	CancelTypeShop = 2 //商家取消

	//默认预约人数
	DefaultReservationPeopleNum = 1

	//结算类型
	SettleTypeZero           = 0
	SettleTypeWaitConsumCard = 1 //待耗卡
	SettleTypeWaitPay        = 2 //待支付
	SettleTypeFinish         = 3 //结算完成
	//订单类型
	OrderTypeProduct = 1 //商品
	OrderTypeService = 2 //服务
	//预约功能状态开关
	ReservSwitchDisableStatus = 0 //关闭
	ReservSwitchEnableStatus  = 1 //开启

	//#周一到周日
	Week_mon  = 1
	Week_tues = 2
	Week_wed  = 3
	Week_thur = 4
	Week_fri  = 5
	Week_sat  = 6
	Week_sun  = 7
)

Variables

View Source
var AddMap = map[int]string{

	ADDRESS_COMPANY: "公司",
	ADDRESS_HOME:    "家",
	OTHER:           "其他",
}
View Source
var EpiMap = map[int]string{

	EPI_LIFE:    "疫情发源地生活史",
	EPI_TRAVEL:  "疫情发源地旅游史",
	EPI_CONTACT: "疫情发源地接触史",
	EPI_NO:      "无疫情状况",
	OTHER:       "其他",
}
View Source
var HealthMap = map[int]string{

	HEALTH_FEVER:  "发热",
	HEALTH_COUGH:  "咳嗽",
	HEALTH_RESP:   "呼吸道感染",
	HEALTH_HEALTH: "健康",
	OTHER:         "其他",
}
View Source
var TraMap = map[int]string{

	TRAFFIC_BUS:   "公交车",
	TRAFFIC_METRO: "地铁",
	TRAFFIC_WALK:  "步行",
	TRAFFIC_TAXI:  "出租车",
	TRAFFIC_DRIVE: "驾车",
	OTHER:         "其他",
}

Functions

func CheckStatusInArray

func CheckStatusInArray(status int) bool

func CheckTypeInArray

func CheckTypeInArray(typ int) bool

func GetStatusList

func GetStatusList() []int

预约状态

func GetTypeList

func GetTypeList() []int

预约类型

func GetWeekTypeLists

func GetWeekTypeLists() []int

Types

type Address

type Address struct {
	Id   int
	Name string
}

出行地点

type Args

type Args struct{}

type ArgsBusOpenCloseReservSwitch

type ArgsBusOpenCloseReservSwitch struct {
	common.BsToken
	Status int //否开启预约功能 0 关闭, 1 开启
}

总店开启/关闭预约功能-入参

type ArgsGetCardPackageSingleNum

type ArgsGetCardPackageSingleNum struct {
	Uid             int
	CardId          int   // 卡包关联id
	CardPackageType int   // 卡包类型
	SingleIds       []int // 卡包的单项目
}

查询预约中用户卡包单项目的预约次数(未结束的)入参

type ArgsGetItemsByReservationIds

type ArgsGetItemsByReservationIds struct {
	ShopID         int
	ReservationIDs []int
}

根据预约ids获取预约条目入参

type ArgsGetKxbOrderedList

type ArgsGetKxbOrderedList struct {
	common.BsToken
	common.Paging
	Phone      string // 手机号
	Status     int
	GetSameDay bool // 是否获取当天的数据,内部使用
	Uid        int  // 会员uid
	SettleType int  // 结算类型 1-待耗卡;2-待支付;3-结算完成
	OrderType  int  // 订单类型:1-商品;2-服务

}

门店预约订单管理(待收银和已完成)入参

type ArgsGetMemberReservation

type ArgsGetMemberReservation struct {
	common.BsToken
	Uid int
}

查询会员的待服务列表

type ArgsGetReservSwitchStatus

type ArgsGetReservSwitchStatus struct {
	BusId int
}

获取预约开启状态-入参

type ArgsGetSimpleReserOrderRpc

type ArgsGetSimpleReserOrderRpc struct {
	Status  []int //过滤的状态
	Uid     int
	OnlyRes bool  //只获取预约单
	EndTime int64 //查询结束时间
}

type ArgsGetTotalStatistics

type ArgsGetTotalStatistics struct {
	common.BsToken
}

根据条件获取预约统计入参

type ArgsHealthAdd

type ArgsHealthAdd struct {
	common.BsToken
	common.Utoken
	ShopId        int
	Health        string //健康状况 1代表发热 2代表咳嗽 3代表呼吸道 多个选项用,号隔开
	Epidemic      string //疫情状况 1 有无疫情发源地生活史 2旅游史 3接触史 多个选项用,号隔开
	Traffic       int    //交通方式  1公交 2地铁 3步行 4出租车 5驾车 6其他
	GTime         string //出行时间
	GAddress      int    //出行地点 1公司 2家 3其他
	ReservationId int    //预约id
}

客户健康信息新增给入参

type ArgsHealthGet

type ArgsHealthGet struct {
	common.Paging
	common.BsToken
	common.Utoken
	ShopId int
	RTime  string
	Data   string //全数字就匹配 查手机号或者单号 Y开头就查单号 两者都不是就查名字
	Type   int    //true用户  false Saas
}

查询客户健康信息入参

type ArgsHealthUpdate

type ArgsHealthUpdate struct {
	common.BsToken
	Id       int
	CId      int    //客户id
	CName    string //客户名
	CPhone   int    //客户手机号
	RTime    int    //预约时间
	OrderNum string //单号
}

客户健康信息更新入参

type ArgsReservationByUser

type ArgsReservationByUser struct {
	Status     int
	Uid        int
	SettleType int // 结算类型 1-待耗卡;2-待支付;3-结算完成
	common.BsToken
	common.Utoken
	common.Paging
}

根据用户信息查询预约条目列表入参

type ArgsReservationRecordListByShopID

type ArgsReservationRecordListByShopID struct {
	common.BsToken
	//ShopId          int
	ReservationTime string // 预约日期
}

门店预约记录

type ArgsReservationStaff

type ArgsReservationStaff struct {
	StaffId   []int //技师ID数组
	StartTime int64 //开始时间戳
	EndTime   int64 //结束时间戳
}

入参技师被占用时间

type ArgsTimeGet

type ArgsTimeGet struct {
	ShopId       int    //门店id
	Cids         []int  //手艺人id
	TimeInterval int    //时间间隔 分钟    默认是 15
	TimeStr      string //时间 格式为: 2020-01-01
}

根据服务id和手艺人id查询时间

type ChangeSettingStatus

type ChangeSettingStatus struct {
	common.BsToken //店面ID
	ShopId         int
	Status         int //0-关闭;1-开启
}

type CodeBase

type CodeBase struct {
	Code           string // 验证码
	ResId          int    // 预约单id
	ExpirationTime int64  // 过期时间
}

预约单的验证码

type Common

type Common interface {
	//添加顾客健康信息
	AddHealth(ctx context.Context, args *ArgsHealthAdd, reply *int) error
	//查询顾客健康信息
	GetHealth(ctx context.Context, args *ArgsHealthGet, reply *ReplyHealth) error
	//根据服务id和手艺人id查询时间
	GetReservationTime(ctx context.Context, args *ArgsTimeGet, reply *ReplyTime) error
	//添加顾客到店健康信息
	AddHealthArrive(ctx context.Context, args *ArgsHealthAdd, reply *int) error
	//添加顾客离店健康信息
	AddHealthLeave(ctx context.Context, args *ArgsHealthAdd, reply *int) error
}

type CommonReserveParams

type CommonReserveParams struct {
	common.BsToken
	common.Utoken
	ShopId               int    // 用户端预约传入
	CallType             int    // 类型:0-预约;1-开单;默认时预约
	RType                int    //预约类型
	RUserType            int    // 预约人类型
	RCardID              int    //卡包ID
	RChannel             int    // 预约渠道
	RRemark              string //预约备注len<1024
	Name                 string //用户昵称
	Phone                string //用户手机号码
	PeopleNum            int    // 预约人数
	IsCrossDay           int    //是否跨日 0=未跨日 1=跨日
	ReservationStartTime string //预约目标到店开始时间,格式:“2012-01-02”
	StartTimePoint       string //开始时间节点,格式:“10:00”
	EndTimePoint         string //结束时间节点,格式:“13:00”
	OccupyTime           int    // 服务占用时长m
	HealthID             int    // 健康ID
	Items                []ItemsBase
	ProductsItems        []ProductBase // 商品数据
}

通用预约接口入参

type CommonReserveReplies

type CommonReserveReplies struct {
	ReservationID int
}

通用预约接口出参

type CreateAndEditSettingParams

type CreateAndEditSettingParams struct {
	common.BsToken                 //店面id
	SettingId       int            // 预约设置ID
	ShopId          int            //此参数只有当总店设置指定分店时传入
	WeekDate        WeekDateParams //日期开启状态
	BusinessBegin   string         //营业开始时间 '09:35'
	BusinessEnd     string         //营业结束时间 '24:45'
	IsCrossDay      int            // 是否跨日 0:否,1:是
	TimeGranularity int            //预约时间粒度 eg:15,30,45m
	MaxCount        int            //每天预约的最大人数
	NoticeTime      float64        // 提前多长时间通知预约用户,单位小时
	//NumberPerTime        int    // 店铺每段时间可预约人数
	//NumberPerTimePerTech int    // 每个手艺人在每段时间最多可预约人数
	//MaxTime              int    //可提前预约的最大时间:m
	MinTime int //可提前预约的最小时间:m
}

添加/编辑预约设置-入参

type DayStatistics

type DayStatistics interface {
	//根据条件获取预约统计数据(今日预约完成数,总待处理预约数)
	GetTotalStatistics(ctx context.Context, args *ArgsGetTotalStatistics, reply *ReplyGetTotalStatistics) error
}

type EditReservationParams

type EditReservationParams struct {
	common.BsToken
	common.Utoken
	ReservationID        int
	RRemark              string //预约备注len<1024
	RType                int    //预约类型
	RCardID              int    //如果预约类型不为 single则设置此参数
	PeopleNum            int    // 预约人数
	IsCrossDay           int    //是否跨日 0=未跨日 1=跨日
	ReservationStartTime string //预约目标到店开始时间,格式:“2012-01-02”
	StartTimePoint       string //开始时间节点,格式:“10:00”
	EndTimePoint         string //结束时间节点,格式:“13:00”
	OccupyTime           int    // 服务占用时长m
	Items                []ItemsBase
	ProductsItems        []ProductBase // 商品数据
}

编辑预约记录入参

type Epidemics

type Epidemics struct {
	Id   int
	Name string
}

疫情状态

type EsReservationHealth

type EsReservationHealth struct {
	ReservationId        int
	Uid                  int
	Name                 string
	Phone                string
	ShopId               int
	ShopName             string
	BranchName           string
	OrderNumber          string
	ReachHealthId        int
	LeaveHealthId        int
	ArriveHealthId       int
	ReservationStartTime string
}

type GetReservationItemListParams

type GetReservationItemListParams struct {
	common.BsToken
	StaffID int    //员工ID
	Date    string //日期
}

type GetReservationItemListReplies

type GetReservationItemListReplies struct {
	Data []Item
}

type GetReservationRecordListParams

type GetReservationRecordListParams struct {
	common.BsToken
	common.Paging
	ShopId     int
	BusId      int
	Phone      string // 手机号
	RStatus    int    //预约状态
	OrderType  int    // 订单类型:0-商品;1-服务
	SettleType int    // 结算类型 1-待耗卡;2-待支付;3-结算完成
	GetSameDay bool   // 是否获取当天的数据
	StartTime  string // 到店开始时间
	EndTime    string // 到店结束时间
	Keyword    string // 手机号和名字
}

获取预约记录入参

type GetReservationRecordListReplies

type GetReservationRecordListReplies struct {
	TotalNum     int
	Data         []GetReservationRecordReplies
	Specs        []cards.Specs                  // 项目的规格
	ProductSpecs []product2.GetSpecs            // 商品规格
	StaffIndex   []staff.ReplyGetListByStaffIds // 员工数据
}

获取预约记录出参

type GetReservationRecordParams

type GetReservationRecordParams struct {
	common.BsToken
	common.Utoken
	ReservationID int
}

根据预约ID获取预约记录入参

type GetReservationRecordReplies

type GetReservationRecordReplies struct {
	ReservationID           int     `mapstructure:"reservation_id"`     //预约记录ID
	ReservationStatus       int     `mapstructure:"reservation_status"` //预约记录状态
	ReservationType         int     `mapstructure:"reservation_type"`   //预约记录类型
	CardID                  int     `mapstructure:"card_id"`            //卡包关联ID
	CardPackageId           int     `mapstructure:"card_package_id"`    // 卡包ID
	CardPackageName         string  `mapstructure:"card_package_name"`  // 卡包名
	ReservationRemark       string  `mapstructure:"reservation_remark"` //预约记录注释
	Name                    string  `mapstructure:"name"`               //预约记录 用户昵称
	Phone                   string  `mapstructure:"phone"`              //预约记录 用户电话
	SettleType              int     `mapstructure:"settle_type"`        //结算类型:1-待耗卡;2-待支付
	UserImg                 string  // 会员头像
	Uid                     int     // 会员ID
	MemberName              string  // 会员名
	UserType                int     `mapstructure:"reservation_user_type"` // 用户类型
	ReservationChannel      int     `mapstructure:"reservation_channel"`
	BusID                   int     `mapstructure:"bus_id"`  //预约记录 目标商户ID
	ShopID                  int     `mapstructure:"shop_id"` //预约记录 目标店面ID
	ShopName                string  //分店门店名称
	BranchName              string  //分店名称
	PeopleNum               int     `mapstructure:"people_num"`             // 预约人数
	OrderNumber             string  `mapstructure:"order_number"`           // 预约单号
	ReservationStartTime    int64   `mapstructure:"reservation_start_time"` //预约记录 预约时间,格式:“2012-01-02”
	StartTimePoint          string  `mapstructure:"start_time_point"`       //开始时间节点,格式:“10:00”
	EndTimePoint            string  `mapstructure:"end_time_point"`         //结束时间节点,格式:“13:00”
	ReservationStartTimeStr string  //预约记录 预约时间
	OccupyTime              int     `mapstructure:"occupy_time"` // 服务占用时间
	CreateTime              int64   `mapstructure:"create_time"` //预约记录创建时间
	CreateTimeStr           string  //预约记录创建时间
	OrderTime               int64   `mapstructure:"order_time"` // 开单时间
	CallType                int     `mapstructure:"call_type"`  // 订单类型
	OrderTimeStr            string  // 开单时间
	CancelTime              int64   `mapstructure:"cancel_time"` //取消时间
	CancelTimeStr           string  //取消时间
	SettlementTime          int64   `mapstructure:"settlement_time"` //取消时间
	SettlementTimeStr       string  // 结算时间
	BusRemark               string  `mapstructure:"bus_remark"`     //商家备注
	CancelMessage           string  `mapstructure:"cancel_message"` //
	TotalPrice              float64 `mapstructure:"total_price"`    //总价
	Preferential            float64 `mapstructure:"preferential"`   // 优惠
	ReachHealthId           int     //到店前健康id
	LeaveHealthId           int     //离店前健康id
	Code                    string  // 预约验证码
	ReservationItems        []ReservationItemsBase
	ProductItems            []ProductBase // 预约的商品
}

type GetSettingParams

type GetSettingParams struct {
	common.BsToken
	ShopID int //店面ID
}

type GetSettingReplies

type GetSettingReplies struct {
	SettingID         int            `mapstructure:"setting_id"`     //预约设置id
	ShopID            int            `mapstructure:"shop_id"`        //店面ID
	SettingEnable     int            `mapstructure:"setting_enable"` //setting_enable:0-关闭;1-开启
	WeekDate          WeekDateParams //日期开启状态
	BusinessBeginTime string         `mapstructure:"business_begin_time"` //预约开始时间
	BusinessEndTime   string         `mapstructure:"business_end_time"`   //预约结束时间
	TimeGranularity   int            `mapstructure:"time_granularity"`    //时间粒度
	IsCrossDay        int            `mapstructure:"is_cross_day"`
	MaxCount          int            `mapstructure:"max_count"` //店铺每天预约的最大人数
	NoticeTime        float64        // 提前多长时间通知预约用户,单位小时
	//MaxTime              int    `mapstructure:"max_time"`                 //可提前预约的最大时间
	MinTime int `mapstructure:"min_time"` //可提前预约的最小时间

}

type HealthInfo

type HealthInfo struct {
	EsReservationHealth
	//CId          int         //客户id
	//CName        string   //客户名
	//CPhone       string    //客户手机号
	//ShopId       int      //门店id
	//ShopName     string
	//BranchName   string
	//RTime        string    //预约时间`mapstructure:"order_num"` //单号
	//OrderNum	 string
	//RId          int
	IsFever      bool   //是否发热
	IsCough      bool   //是否咳嗽
	IsResp       bool   //是否有呼吸道症状
	IsEpiLife    bool   //是否有疫情地区生活史
	IsEpiTravel  bool   //是否有疫情地区旅游史
	IsEpiContact bool   //是否有疫情地区接触史
	Traffic      string //交通方式  1公交 2地铁 3步行 4出租车 5驾车 6其他
	GTime        string //出行时间
	GAddress     string //出行地点 1公司 2家 3其他
	//AId 		int
	AIsFever bool //是否发热
	AIsCough bool //是否咳嗽
	AIsResp  bool //是否有呼吸道症状
	//LId			int
	LTraffic  string //交通方式  1公交 2地铁 3步行 4出租车 5驾车 6其他
	LGTime    string //出行时间
	LGAddress string //出行地点 1公司 2家 3其他
}

type Healths

type Healths struct {
	Id   int
	Name string
}

健康状态

type InvalidateReservationItemParams

type InvalidateReservationItemParams struct {
	common.BsToken
	ItemID int
}

type Item

type Item struct {
	ReservationItemID  int     `mapstructure:"reservation_item_id"`  //预约条目ID
	StaffID            int     `mapstructure:"staff_id"`             //技师ID
	GoodsId            int     `mapstructure:"goods_id"`             //商品ID
	OriginalPrice      float64 `mapstructure:"original_price"`       //项目原价
	Price              float64 `mapstructure:"price"`                // 规格价格
	SsId               int     `mapstructure:"ss_id"`                // 单项目在门店的ID
	SkuID              int     `mapstructure:"sku_id"`               // 商品规格ID(商品明细ID)
	EstimatedStartTime string  `mapstructure:"estimated_start_time"` //预计项目开始时间
	EstimatedDuration  int     `mapstructure:"estimated_duration"`   //预计项目持续时间
	Nick               string  `mapstructure:"nick"`                 //用户昵称
	Phone              string  `mapstructure:"phone"`                //用户手机号
}

type ItemsBase

type ItemsBase struct {
	ReservationItemId int
	StaffIDs          string  //技师id
	SalesStaffIDs     string  //服务人员id
	SingleID          int     //单项目Id
	SingleImgUrl      string  //图片
	SingleImgId       int     // 单项目图片
	SingleName        string  //单项目name
	SingleNum         int     //单项目数量
	OriginalPrice     float64 //项目原价
	Price             float64 // 项目售价
	SkuID             int     // 门店单项目规格ID
	SsId              int     // 单项目在门店的ID

	SkuName string // 规格名
	SpecIds string //子规格组合

	EstimatedStartTime    int64 // 服务开始时间()
	EstimatedStartTimeStr string
	EstimatedDuration     int // 服务持续时间
}

预约的项目基础结构

type ModifyReservationParams

type ModifyReservationParams struct {
	common.BsToken //需要店面登陆
	common.Utoken
	Code           string // 预约确认验证码
	ReservationID  int
	ReservationIDs []int
	Status         int
	CancelType     int // 取消类型
	Message        string
}

状态变更入参

type ProductBase

type ProductBase struct {
	ProductItemId   int     //
	ReservationID   int     //预约记录ID
	SalesStaffIds   string  //服务人员ids
	ProductId       int     //商品id
	ProductImgUrl   string  //商品图片
	ProductNum      int     //商品数量默认为1
	OriginalPrice   float64 //商品原价
	Price           float64 // 商品价格
	ProductName     string  // 商品名
	ProductImgId    int     // 商品图片
	ProductSpecName string  // 规格名

	ProductSpecId int    // 商品规格
	SpecIds       string //子规格组合id
}

预约的商品基础结构

type ProductItem

type ProductItem struct {
	OriginalPrice   float64 `mapstructure:"original_price"` //项目原价
	Price           float64 `mapstructure:"price"`
	Num             int     `mapstructure:"product_num"`
	SalesStaffIds   string  `mapstructure:"sales_staff_ids"`
	SalesStaffNames string
	ProductId       int    `mapstructure:"product_id"`
	ProductName     string `mapstructure:"product_name"`
	DetailId        int    `mapstructure:"product_spec_id"`
	SpecNames       string `mapstructure:"product_spec_name"`
}

type Record

type Record interface {
	//通用预约接口
	CommonReserve(ctx context.Context, params *CommonReserveParams, replies *ReplyCommonReserveParams) (err error)
	//编辑预约
	EditReservation(ctx context.Context, params *EditReservationParams, replies *bool) (err error)
	//更新预约记录状态
	ChangeStatus(ctx context.Context, params *ModifyReservationParams, replies *bool) (err error)
	//获取预约记录信息
	GetReservationRecord(ctx context.Context, params *GetReservationRecordParams, replies *ReplyGetReservationRecordParams) (err error)
	//根据预约ids获取预约条目-rpc
	GetItemsByReservationIdsRpc(ctx context.Context, params *ArgsGetItemsByReservationIds, replies *ReplyGetItemsByReservationIds) (err error)
	//获取预约管控记录列表-总店/分店
	GetReservationControlList(ctx context.Context, params *GetReservationRecordListParams, replies *GetReservationRecordListReplies) (err error)
	//管控RPC内部
	GetReservationControlListRpc(ctx context.Context, ids *[]int, replies *GetReservationRecordListReplies) (err error)
	// 门店预约看板
	GetReservationRecordListByShopID(ctx context.Context, params *ArgsReservationRecordListByShopID, replies *ReplyReservationRecordListByShopID) (err error)
	//设置预约Item失效
	InvalidateReservationItem(ctx context.Context, params *InvalidateReservationItemParams, replies *bool) (err error)
	//获取员工预约条目列表
	GetReservationItemList(ctx context.Context, params *GetReservationItemListParams, replies *GetReservationItemListReplies) (err error)
	//获取用户预约条目列表
	GetReservationItemListByUid(ctx context.Context, args *ArgsReservationByUser, reply *ReplyReservationByUser) error
	//门店预约订单管理
	GetKxbOrderedList(ctx context.Context, args *ArgsGetKxbOrderedList, reply *ReplyGetKxbOrderedList) error
	//查询预约中用户卡包单项目的预约次数(未结束的)
	GetCardPackageSingleNum(ctx context.Context, args *ArgsGetCardPackageSingleNum, reply *ReplyGetCardPackageSingleNum) error
	//根据条件获取预约基础信息
	GetSimpleReserOrderRpc(ctx context.Context, args *ArgsGetSimpleReserOrderRpc, reply *ReplyGetSimpleReserOrderRpc) error
}

type ReplyCommonReserveParams

type ReplyCommonReserveParams struct {
	SingleItemsId  int
	ProductItemsId int
}

type ReplyGetCardPackageSingleNum

type ReplyGetCardPackageSingleNum struct {
	SingleNum map[int]int
}

查询预约中用户卡包单项目的预约次数(未结束的)出参

type ReplyGetItemsByReservationIds

type ReplyGetItemsByReservationIds struct {
	Data         map[int][]ReservationItemsBase
	ProductData  map[int][]ProductBase
	Specs        []cards.Specs                  // 项目的规格
	ProductSpecs []product2.GetSpecs            // 商品规格
	StaffIndex   []staff.ReplyGetListByStaffIds // 员工数据
}

根据预约ids获取预约条目出参

type ReplyGetKxbOrderedList

type ReplyGetKxbOrderedList struct {
	TotalNum     int
	Lists        []ReplyGetKxbOrderedListBase
	Specs        []cards.Specs                  // 项目的规格
	ProductSpecs []product2.GetSpecs            // 商品规格
	StaffIndex   []staff.ReplyGetListByStaffIds // 员工数据
}

门店预约订单管理(待收银和已完成)出参

type ReplyGetKxbOrderedListBase

type ReplyGetKxbOrderedListBase struct {
	ReservationId        int    `mapstructure:"reservation_id"`
	ReservationRemark    string `mapstructure:"reservation_remark"` //预约记录注释
	ReservationType      int    `mapstructure:"reservation_type"`
	UserType             int    `mapstructure:"reservation_user_type"` // 用户类型
	CallType             int    `mapstructure:"call_type"`             // 订单类型
	SettleType           int    `mapstructure:"settle_type"`           // 结算类型:1-待耗卡;2-待支付
	PeopleNum            int    `mapstructure:"people_num"`            // 预约人数
	OrderNumber          string `mapstructure:"order_number"`          // 预约单号
	Name                 string `mapstructure:"name"`
	Phone                string `mapstructure:"phone"`
	CardID               int    `mapstructure:"card_id"`         //卡包关联ID
	CardPackageId        int    `mapstructure:"card_package_id"` // 卡包ID
	BusID                int    `mapstructure:"bus_id"`          //预约记录 目标商户ID
	ShopID               int    `mapstructure:"shop_id"`         //预约记录 目标店面ID
	ShopName             string // 分店门店名称
	BranchName           string //分店名称
	CardPackageName      string `mapstructure:"card_package_name"` // 卡包名
	UserImg              string // 会员头像
	Uid                  int    // 会员ID
	MemberName           string // 会员名
	ReservationStatus    int    `mapstructure:"reservation_status"` // 预约状态
	OccupyTime           int    `mapstructure:"occupy_time"`        // 服务占用时间
	ReservationStartTime string //预约记录 预约开始时间// 格式:“2012-01-02”
	StartTimePoint       string `mapstructure:"start_time_point"` //开始时间节点,格式:“10:00”
	EndTimePoint         string `mapstructure:"end_time_point"`   //结束时间节点,格式:“13:00”
	OrderTimeStr         string // 开单时间
	SettlementTimeStr    string // 结算时间
	CancelTimeStr        string //取消时间
	CreateTime           int64
	CreateTimeStr        string
	TotalPrice           float64 //总价
	Preferential         float64 // 优惠
	Code                 string  // 预约验证码
	ReservationItems     []ItemsBase
	ProductItems         []ProductBase // 预约的商品
}

type ReplyGetReplyShopReservation

type ReplyGetReplyShopReservation struct {
	TotalNum int
	Lists    []ReplyGetShopReservationBase
}

type ReplyGetReservSwitchStatus

type ReplyGetReservSwitchStatus struct {
	Status int
}

获取预约开启状态-出参

type ReplyGetReservationRecordParams

type ReplyGetReservationRecordParams struct {
	GetReservationRecordReplies
	Specs        []cards.Specs                  // 项目的规格
	ProductSpecs []product2.GetSpecs            // 商品规格
	StaffIndex   []staff.ReplyGetListByStaffIds // 员工数据
}

type ReplyGetShopReservationBase

type ReplyGetShopReservationBase struct {
	Uid         int
	UserImage   string
	UserName    string
	Phone       string
	ResTime     int
	MemberLevel int
	MemberName  string
	//Services
	ServiceItems []ServiceItem
	//Product
	ProductItems []ProductItem
}

type ReplyGetSimpleReserOrderRpc

type ReplyGetSimpleReserOrderRpc struct {
	ResIds   []int
	TotalNum int
}

type ReplyGetTotalStatistics

type ReplyGetTotalStatistics struct {
	TodayCompleteTotalNum int //今日预约完成总数
	PendingTotalNum       int //待处理总数
}

根据条件获取预约统计出参

type ReplyHealth

type ReplyHealth struct {
	TotalNum int          //总数量
	List     []HealthInfo //客户健康信息
}

客户健康信息返回

type ReplyReservationByUser

type ReplyReservationByUser struct {
	TotalNum int
	Lists    []UserReservation //

}

根据用户信息查询预约条目列表返回

type ReplyReservationHealth

type ReplyReservationHealth struct {
	ToTalNum int
	Lists    []EsReservationHealth
}

type ReplyReservationRecordListByShopID

type ReplyReservationRecordListByShopID struct {
	TotalNum     int
	Data         *[]ReservationRecordListByShopIDBase2
	Specs        []cards.Specs                  // 项目的规格
	ProductSpecs []product2.GetSpecs            // 商品规格
	StaffIndex   []staff.ReplyGetListByStaffIds // 员工数据
}

type ReplyReservationStaff

type ReplyReservationStaff struct {
	StaffId            int    //技师ID
	ReservationTime    int64  //预约到店时间戳
	StartTimePoint     string //开始时间节点,格式:"12:00"
	EndTimePoint       string //结束时间节点,格式:"12:00"
	ReservationTimeStr string //预约到店字符串 格式19:35
}

返回技师被占用时间

type ReplySettingShops

type ReplySettingShops struct {
	ShopId        int //分店ID
	SettingEnable int //开启状态 0=未开启/关闭 1=开启
}

批量获取分店预约设置返回信息

type ReplyTime

type ReplyTime struct {
	ReserveEndTime      int
	ReserveEndTimeStr   string
	ReserveStartTime    int
	ReserveStartTimeStr string
	UnreservableTime    []map[string]interface{}
}

查询手艺人占用时间返回

type ReservationHealth

type ReservationHealth struct {
	Healths   []Healths
	Epidemics []Epidemics
	Traffics  []Traffics
	Address   []Address
}

返回顾客健康信息

type ReservationItemsBase

type ReservationItemsBase struct {
	ReservationID     int    //预约记录ID
	ReservationItemID int    //预约条目ID
	StaffIDs          string //技师ID
	SalesStaffIDs     string //服务人员id
	SingleId          int    //
	SingleImgUrl      string //单项目图片
	SingleNum         int    //单项目数量
	SingleImgId       int    // 单项目图片ID
	//ShopId               int
	SsId                  int // 单项目在门店的ID
	SingleName            string
	SkuID                 int     // 规格ID
	SkuName               string  // 规格名
	SpecIds               string  //子规格组合id
	OriginalPrice         float64 //项目原价
	Price                 float64 // 规格价格
	EstimatedStartTime    int64   //预计项目开始时间
	EstimatedStartTimeStr string
	EstimatedDuration     int //预计项目持续时间
}

type ReservationItemsBase2

type ReservationItemsBase2 struct {
	ReservationID         int     `mapstructure:"reservation_id"`      //预约记录ID
	ReservationItemID     int     `mapstructure:"reservation_item_id"` //预约条目ID
	StaffIDs              string  `mapstructure:"staff_ids"`           //技师ID
	SalesStaffIDs         string  `mapstructure:"sales_staff_ids"`     //服务人员id
	SingleId              int     `mapstructure:"single_id"`           //
	SingleNum             int     `mapstructure:"single_num"`          //单项目数量
	SingleImgUrl          string  //单项目图片
	SingleImgId           int     `mapstructure:"single_img_id"`
	SsId                  int     `mapstructure:"ss_id"` // 单项目在门店的ID
	SingleName            string  `mapstructure:"single_name"`
	SkuID                 int     `mapstructure:"sku_id"`   // 规格ID
	SkuName               string  `mapstructure:"sku_name"` // 规格名
	SpecIds               string  //子规格组合id
	OriginalPrice         float64 `mapstructure:"original_price"`       //项目原价
	Price                 float64 `mapstructure:"price"`                // 规格价格
	EstimatedStartTime    int64   `mapstructure:"estimated_start_time"` //预计项目开始时间
	EstimatedStartTimeStr string
	EstimatedDuration     int `mapstructure:"estimated_duration"` //预计项目持续时间
}

type ReservationRecordListByShopIDBase

type ReservationRecordListByShopIDBase struct {
	EstimatedDuration int     `mapstructure:"estimated_duration"` //预计项目持续时间
	ReservationId     int     `mapstructure:"reservation_id"`     //预计项目持续时间
	StaffIds          string  `mapstructure:"staff_ids"`          //手艺人id
	SalesStaffIDs     string  `mapstructure:"sales_staff_ids"`    //服务人员id
	SingleId          int     `mapstructure:"single_id"`          //单项目id
	SingleNum         int     `mapstructure:"single_num"`         //单项目数量
	SingleName        string  //单项目名字
	SkuID             int     `mapstructure:"sku_id"` //子规格id
	SsId              int     `mapstructure:"ss_id"`  // 单项目在门店的ID
	SingleImgUrl      string  //单项目图片
	SingleImgId       int     // 单项目图片ID
	SpecIds           string  //子规格组合ID
	OriginalPrice     float64 `mapstructure:"original_price"` //项目原价
	Price             float64 `mapstructure:"price"`          // 规格价格
}

type ReservationRecordListByShopIDBase2

type ReservationRecordListByShopIDBase2 struct {
	ReservationId        int     `mapstructure:"reservation_id"`
	ReservationRemark    string  `mapstructure:"reservation_remark"` //预约记录注释
	ReservationType      int     `mapstructure:"reservation_type"`
	PeopleNum            int     `mapstructure:"people_num"`   // 预约人数
	OrderNumber          string  `mapstructure:"order_number"` // 预约单号
	SettleType           int     `mapstructure:"settle_type"`  //结算类型:1-待耗卡;2-待支付
	Name                 string  `mapstructure:"name"`
	Phone                string  `mapstructure:"phone"`
	BusID                int     `mapstructure:"bus_id"`                 //预约记录 目标商户ID
	ShopID               int     `mapstructure:"shop_id"`                //预约记录 目标店面ID
	CardID               int     `mapstructure:"card_id"`                //卡包关联ID
	CardPackageId        int     `mapstructure:"card_package_id"`        // 卡包ID
	CardPackageName      string  `mapstructure:"card_package_name"`      // 卡包名
	CallType             int     `mapstructure:"call_type"`              // 订单类型
	ReservationStatus    int     `mapstructure:"reservation_status"`     // 预约状态
	OccupyTime           int     `mapstructure:"occupy_time"`            // 服务占用时间
	ReservationEndTime   string  `mapstructure:"reservation_end_time"`   //预约记录 预约结束时间
	ReservationStartTime string  `mapstructure:"reservation_start_time"` //预约记录 预约开始时间,格式:“2012-01-02”
	StartTimePoint       string  `mapstructure:"start_time_point"`       //开始时间节点,格式:“10:00”
	EndTimePoint         string  `mapstructure:"end_time_point"`         //结束时间节点,格式:“13:00”
	CreateTime           string  `mapstructure:"create_time"`            //预约记录创建时间
	OrderTime            int64   `mapstructure:"order_time"`             // 开单时间
	CancelTime           int64   `mapstructure:"cancel_time"`            //取消时间
	OrderTimeStr         string  // 开单时间
	CancelTimeStr        string  //取消时间
	SettlementTimeStr    string  // 结算时间
	CreateTimeStr        string  //创建时间
	TotalPrice           float64 `mapstructure:"total_price"`  //总价
	Preferential         float64 `mapstructure:"preferential"` // 优惠
	ReservationItem      []ReservationRecordListByShopIDBase
	ProductItems         []ProductBase // 预约的商品
}

type ServiceItem

type ServiceItem struct {
	SingleId         int    `mapstructure:"single_id"`
	SingName         string `mapstructure:"single_name"`
	SkuId            int    `mapstructure:"sku_id"`
	SsId             int    `mapstructure:"ss_id"` // 单项目在门店的ID
	SkuName          string `mapstructure:"sku_name"`
	SalesStaffIds    string `mapstructure:"sales_staff_ids"`
	SalesStaffNames  string
	StaffIds         string `mapstructure:"staff_ids"`
	StaffNames       string
	OriginalPrice    float64 `mapstructure:"original_price"` //项目原价
	Price            float64 `mapstructure:"price"`
	ServiceTime      int     `mapstructure:"estimated_duration"`
	SerdverStartTime int     `mapstructure:"estimated_start_time"`
	Num              int     `mapstructure:"single_num"`
}

type SetSettingParams

type SetSettingParams struct {
	common.BsToken                    //店面id
	BeginTime               time.Time //营业开始时间
	BusinessDuration        int       //营业时长
	DistributionGranularity int       //时间分配粒度
	MaxTime                 int       //最大提前预约时间
	MinTime                 int       //最下提前预约时间
	MaxCount                int       //每天可预约的最大数量
	RemainderTime           int       //预约提前多长时间提醒
}

type Setting

type Setting interface {
	//总店开启/关闭预约功能
	BusOpenCloseReservSwitch(ctx context.Context, args *ArgsBusOpenCloseReservSwitch, reply *bool) error
	//获取总店预约功能开启状态
	GetReservSwitchStatus(ctx context.Context, args *ArgsGetReservSwitchStatus, reply *ReplyGetReservSwitchStatus) error
	// 获取预约配置
	GetSetting(ctx context.Context, args *GetSettingParams, reply *GetSettingReplies) error
	// 店面创建预约设置
	CreateSetting(ctx context.Context, args *CreateAndEditSettingParams, reply *bool) error
	// 店面编辑预约设置
	EditSetting(ctx context.Context, args *CreateAndEditSettingParams, reply *bool) error
	// 店面开通预约设置
	EnableSetting(ctx context.Context, args *CreateAndEditSettingParams, reply *bool) error
	// 更改预约设置状态
	ChangeSettingStatus(ctx context.Context, args *ChangeSettingStatus, reply *bool) error
}

type Traffics

type Traffics struct {
	Id   int
	Name string
}

出行方式

type UserReservation

type UserReservation struct {
	ReservationId     int    `mapstructure:"reservation_id"` //预约id
	OrderNumber       string `mapstructure:"order_number"`   //订单号
	PeopleNum         int    `mapstructure:"people_num"`     //预约人数
	BusId             int    `mapstructure:"bus_id"`
	SettleType        int    //结算类型
	ShopImg           string //门店照片
	ShopId            int    `mapstructure:"shop_id"` //门店id
	ShopName          string //门店名称
	BranchName        string //分店名称
	Phone             string //门店电话
	Code              string //预约验证码
	ResTime           int    `mapstructure:"reservation_start_time"` //预约时间
	ResTimeStr        string // 格式:“2012-01-02”
	StartTimePoint    string `mapstructure:"start_time_point"`   //开始时间节点,格式:“10:00”
	EndTimePoint      string `mapstructure:"end_time_point"`     //结束时间节点,格式:“13:00”
	Status            int    `mapstructure:"reservation_status"` //预约状态
	OrderTime         int    `mapstructure:"order_time"`         //开单时间
	OrderTimeStr      string
	CreateTimeStr     string        //创建时间
	ReservationRemark string        `mapstructure:"reservation_remark"`
	Services          []ServiceItem //服务数组
	Products          []ProductItem //商品数组
}

根据用户id查询预约

type WeekDateParams

type WeekDateParams struct {
	WeekMonStatus  int //周一状态,0:关闭,1-开启
	WeekTuesStatus int //周二状态,0:关闭,1-开启
	WeekWedStatus  int //周三状态,0:关闭,1-开启
	WeekThurStatus int //周四状态,0:关闭,1-开启
	WeekFriStatus  int //周五状态,0:关闭,1-开启
	WeekSatStatus  int //周六状态,0:关闭,1-开启
	WeekSunStatus  int //周日状态,0:关闭,1-开启
}

日期

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL