130 lines
6.4 KiB
Go
130 lines
6.4 KiB
Go
package v1
|
||
|
||
import "github.com/gogf/gf/v2/frame/g"
|
||
|
||
type ListReq struct {
|
||
g.Meta `path:"/reward" method:"get" tags:"Reward" summary:"(系统、商户、门店后台)获取奖励列表"`
|
||
Name string `json:"name" dc:"名称"`
|
||
Page int `json:"page" dc:"页数"`
|
||
Size int `json:"size" dc:"每页数量"`
|
||
Status int `json:"status" dc:"状态"`
|
||
StoreId int64 `json:"storeId" dc:"门店ID"`
|
||
RewardTypeId int64 `json:"rewardTypeId" dc:"奖励类型ID"`
|
||
}
|
||
|
||
type ListRes struct {
|
||
List interface{} `json:"list" dc:"奖励列表"`
|
||
Total int `json:"total" dc:"总数"`
|
||
}
|
||
|
||
type CreateReq struct {
|
||
g.Meta `path:"/reward" method:"post" tags:"Reward" summary:"(系统、商户、门店后台)创建奖励"`
|
||
Name string `json:"name" v:"required#名称不能为空" dc:"名称"`
|
||
Description string `json:"description" v:"required#描述不能为空" dc:"描述"`
|
||
Value int64 `json:"value" v:"required#数值不能为空" dc:"奖励值"`
|
||
Status int `json:"status" dc:"状态" d:"1"`
|
||
StoreId int64 `json:"storeId" dc:"门店ID"`
|
||
RewardTypeId int64 `json:"rewardTypeId" v:"required#奖励类型ID不能为空" dc:"奖励类型ID"`
|
||
Source int `json:"source" v:"in:1,2#来源只能为1或2" dc:"来源"`
|
||
}
|
||
|
||
type CreateRes struct {
|
||
Id int64 `json:"id" dc:"奖励ID"`
|
||
}
|
||
|
||
type UpdateReq struct {
|
||
g.Meta `path:"/reward" method:"put" tags:"Reward" summary:"(系统、商户、门店后台)更新奖励"`
|
||
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
|
||
Name string `json:"name" v:"required#名称不能为空" dc:"名称"`
|
||
Description string `json:"description" v:"required#描述不能为空" dc:"描述"`
|
||
Value int64 `json:"value" v:"required#数值不能为空" dc:"奖励值"`
|
||
Status int `json:"status" dc:"状态" d:"1"`
|
||
StoreId int64 `json:"storeId" dc:"门店ID"`
|
||
}
|
||
|
||
type UpdateRes struct {
|
||
Success bool `json:"success" dc:"是否成功"`
|
||
}
|
||
|
||
type DeleteReq struct {
|
||
g.Meta `path:"/reward/{id}" method:"delete" tags:"Reward" summary:"(系统、商户、门店后台)删除奖励"`
|
||
Id int64 `in:"path" json:"id" v:"required#ID不能为空" dc:"ID"`
|
||
}
|
||
|
||
type DeleteRes struct {
|
||
Success bool `json:"success" dc:"是否成功"`
|
||
}
|
||
|
||
type CallbackReq struct {
|
||
g.Meta `path:"/reward/callback" method:"post" tags:"Reward" summary:"(tencent)回调"`
|
||
TaskId int64 `json:"taskId" v:"required#任务id不能为空" dc:"任务Id"`
|
||
AreaId int64 `json:"areaId" dc:"大区Id"`
|
||
GameId int64 `json:"gid" v:"required#游戏id不能为空" dc:"游戏Id"`
|
||
RoleIdx string `json:"roleIdx" dc:"角色索引"`
|
||
RewradType []int64 `json:"rewardType" v:"required#奖励类型不能为空" dc:"奖励类型"`
|
||
}
|
||
|
||
type CallbackRes struct {
|
||
List interface{} `json:"list" dc:"物品列表"`
|
||
Result int64 `json:"result" dc:"1-奖励发放成功,2-奖励兑换失败(礼包发放背包环节成功,需要重新引导领奖)3-针对只需要发背包,然后引导用户到人生应用背包领奖的奖励类型,发奖成功了,4-water错误(一般是orderid),不做兑换操作"`
|
||
Water *Water `json:"water" dc:"礼包列表"`
|
||
}
|
||
|
||
type GetLiftReq struct {
|
||
g.Meta `path:"/reward/getLift" method:"post" tags:"Reward" summary:"(tencent)回调"`
|
||
TaskId int64 `json:"taskId" v:"required#任务id不能为空" dc:"任务Id"`
|
||
AreaId int64 `json:"areaId" dc:"大区Id"`
|
||
GameId int64 `json:"gid" v:"required#游戏id不能为空" dc:"游戏Id"`
|
||
RoleIdx string `json:"roleIdx" dc:"角色索引"`
|
||
RewradType []int64 `json:"rewardType" v:"required#奖励类型不能为空" dc:"奖励类型"`
|
||
}
|
||
|
||
type GetLiftRes struct {
|
||
List interface{} `json:"list" dc:"物品列表"`
|
||
Result int64 `json:"result" dc:"1-奖励发放成功,2-奖励兑换失败(礼包发放背包环节成功,需要重新引导领奖)3-针对只需要发背包,然后引导用户到人生应用背包领奖的奖励类型,发奖成功了,4-water错误(一般是orderid),不做兑换操作"`
|
||
Water *Water `json:"water" dc:"礼包列表"`
|
||
}
|
||
|
||
type Water struct {
|
||
}
|
||
|
||
type GetGoodsListReq struct {
|
||
g.Meta `path:"/reward/goods" method:"get" tags:"Reward" summary:"(tencent)获取物品列表"`
|
||
Appfilter string `json:"appfilter" dc:"按照gid过滤游戏"`
|
||
BigTime int64 `json:"bigTime" v:"required#大时间不能为空" dc:"大时间:如果要控制时间范围,大的时间传这里"`
|
||
Pageidx string `json:"pageidx" dc:"分页索引"`
|
||
Num int64 `json:"num" v:"required#数量不能为空" dc:"数量"`
|
||
OrderType string `json:"orderType" dc:"winningtime:根据获取时间排序 overduetime:根据过期时间排序"`
|
||
OrderbyDesc int64 `json:"orderbDesc" dc:"1:降序 2:升序"`
|
||
Goodsstatus int64 `json:"Goodsstatus" dc:"查询的物品状态:0:查所有 2是已发放(成功和失败),4是未发放且未过期,6是未发放且已过期"`
|
||
}
|
||
|
||
type GetGoodsListRes struct {
|
||
List interface{} `json:"list" dc:"物品列表"`
|
||
Pageidx string `json:"pageidx" dc:"分页索引"`
|
||
Total int64 `json:"total" dc:"总数"`
|
||
}
|
||
|
||
type GetGoodsReq struct {
|
||
g.Meta `path:"/reward/getGoods" method:"post" tags:"Reward" summary:"物品兑换"`
|
||
Water Water `json:"water" v:"required#物品流水,从背包列表获取的water透传回来(water类型参考GetGift接口的water结构)" dc:"礼包列表"`
|
||
AreaId int64 `json:"areaId" dc:"大区Id"`
|
||
GameId int64 `json:"gid" v:"required#游戏id不能为空" dc:"游戏Id"`
|
||
RoleIdx string `json:"roleIdx" dc:"角色索引"`
|
||
}
|
||
type GetGoodsRes struct {
|
||
Water Water `json:"water" dc:"用户领取物品流水记录"`
|
||
}
|
||
|
||
type GetGoodsDetailsReq struct {
|
||
g.Meta `path:"/reward/goodsDetails" method:"post" tags:"Reward" summary:"物品详情"`
|
||
Winningtime int64 `json:"winningtime" dc:"用户领取礼包时间"`
|
||
Orderid string `json:"orderid" v:"required#流水订单id不能为空" dc:"用户领取流水订单id"`
|
||
IsActinfo int64 `json:"IsActinfo" dc:"是否需要活动相关信息 0:默认需要 1:不需要"`
|
||
IsDocument int64 `json:"isDocument" dc:"是否需要文案信息,使用限制信息、代金券图片、使用方式 0:默认需要 1:不需要"`
|
||
IsDetail int64 `json:"isDetail" dc:"是否需要物品详情 0:默认需要 1:不需要"`
|
||
}
|
||
type GetGoodsDetailsRes struct {
|
||
Water *Water `json:"water" dc:"流水信息"`
|
||
}
|