新增游戏人生领取奖励相关接口
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
type ListReq struct {
|
||||
g.Meta `path:"/reward" method:"get" tags:"Reward" summary:"(系统、商户、门店后台)获取奖励列表"`
|
||||
@ -55,19 +57,131 @@ 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:"奖励类型"`
|
||||
// GiftResponse Water 外部--
|
||||
type GiftResponse struct {
|
||||
GiftItem GiftItem `json:"rst_list"`
|
||||
}
|
||||
|
||||
type GameRoleInfo struct {
|
||||
// FIXME
|
||||
}
|
||||
|
||||
type userAddress struct {
|
||||
// FIXME
|
||||
}
|
||||
|
||||
type WaterExtraInfo struct {
|
||||
// FIXME
|
||||
}
|
||||
|
||||
type GoodsType struct {
|
||||
// FIXME
|
||||
}
|
||||
|
||||
type GoodsDisplayType struct {
|
||||
// FIXME
|
||||
}
|
||||
|
||||
type MerchantInfo struct {
|
||||
// FIXME
|
||||
}
|
||||
|
||||
type GoodsExtraInfo struct {
|
||||
// FIXME
|
||||
}
|
||||
|
||||
type Water struct {
|
||||
Uid string `json:"uid"` // 用户id
|
||||
UidType uint32 `json:"uidtype"` // 用户id的类型(0是openid,1是uin)
|
||||
WinningTime uint32 `json:"winningtime"` // 获奖时间
|
||||
GoodsId uint32 `json:"goodsid"` // 物品id
|
||||
GoodsCfg GoodsCfg `json:"goodscfg"` // 物品配置置信息
|
||||
Gid uint32 `json:"gid"` // 活动id,领取的游戏渠道
|
||||
OverdueTime uint32 `json:"overduetime"` // 物品的过期时间
|
||||
Status uint32 `json:"status"` // 领取状态: 0未发放,1已发放,2是已发放且失败(失败),4是未发放且未过期,6物品已过期(未发放)
|
||||
RecvUid string `json:"recvuid"` // 领奖的用户 id (qq号)
|
||||
Role GameRoleInfo `json:"role"` // 游戏角色信息
|
||||
CdKey string `json:"cdkey"` // cdkey,实物的兑换码/游戏道具兑换码
|
||||
WaterType uint32 `json:"watertype"` // 抽奖流水类型, 0是抽奖,1是核销,2是 tgp
|
||||
SrcType uint32 `json:"srctype"` // 抽奖来源类型id
|
||||
SrcName string `json:"srcname"` // 抽奖来源类型名称
|
||||
ActId string `json:"actid"` // 活动id
|
||||
LotteryId uint32 `json:"lotteryid"` // 抽奖区id
|
||||
GiftId uint32 `json:"giftid"` // 礼包id
|
||||
ShopId uint32 `json:"shopid"` // 门店id
|
||||
Extra string `json:"extra"` // 线下O2O相关信息
|
||||
RecvTime uint32 `json:"recvtime"` // 领取时间
|
||||
Code string `json:"code"` // 核销码
|
||||
TransEq string `json:"traneq"` // 交易流水号
|
||||
Filter1 string `json:"filter1"` // 用于筛选流水记录的业务自定义条件1
|
||||
Filter2 string `json:"filter2"` // 用于筛选流水记录的业务自定义条件2
|
||||
UserAddrType uint32 `json:"useraddrtype"` // 用户地址类型 (1是默认地址, 2是用户确认后地址)——仅面向邮寄的物品使用
|
||||
UserAddr userAddress `json:"useraddr"` // 用户地址信息——仅面向类型的物品使用
|
||||
Cltip string `json:"cltip"` // 用户领奖ip
|
||||
Bsave uint32 `json:"bsave"` // 是否保存到物品表
|
||||
SaveType uint32 `json:"savetype"` // 0表示用户积分流水, 1表示用户物品表,2表示折扣券
|
||||
Sid uint32 `json:"sid"` // 用户流水id,和uid1共同确定一个物品
|
||||
NeedPoints uint32 `json:"needpoints"` // 物品消耗的钱
|
||||
ExtraInfo WaterExtraInfo `json:"extrainfo"` // 其余信息
|
||||
AppFilter string `json:"appfilter"` // 业务拓展数据,王者人生为空
|
||||
OrderId string `json:"orderid"` // 订单id,唯一标记一条流水
|
||||
MercId string `json:"mercid"` // 商家 id
|
||||
TipOpenId string `json:"tipopenid"` // 游戏人生openid
|
||||
GoodsIdStr string `json:"goods_id_str"` // 字符串类型Goods id
|
||||
GiftIdStr string `json:"gift_id_str"` // 字符串类型Gift id
|
||||
LottIdStr string `json:"lott_id_str"` // 字符串类型Lott id
|
||||
}
|
||||
|
||||
type GoodsCfg struct {
|
||||
GoodsId uint32 `json:"goodsid"` // 物品id
|
||||
Gid uint32 `json:"gid"` // 游戏id
|
||||
GoodsType GoodsType `json:"goodstype"` // 物品类型
|
||||
Maid string `json:"maid"` // ma单号
|
||||
Each uint32 `json:"each"` // 每次发奖的数量
|
||||
GoodsName string `json:"goodsname"` // 物品名称
|
||||
GoodsDetail string `json:"goodsdetail"` // 物品说明信息
|
||||
OverdueTime uint32 `json:"overduetime"` // 物品的过期时间
|
||||
Status uint32 `json:"status"` // 物品状态 0-下线 1-上线
|
||||
GoodsIcon string `json:"goodsicon"` // 物品图片地址
|
||||
Provider string `json:"provider"` // 物品提供方名称
|
||||
RecvWay string `json:"recvway"` // 领取方式
|
||||
RecvWayUrl string `json:"recvwayurl"` // 领取方式详情url
|
||||
MailUrl string `json:"mailurl"` // 邮寄地址url
|
||||
DisplayType GoodsDisplayType `json:"displaytype"` // 物品展示类型(枚举或自定义类型)
|
||||
Merchant MerchantInfo `json:"merchant"` // 商家信息(需另外定义)
|
||||
Extra GoodsExtraInfo `json:"extra"` // 其它信息(需另外定义)
|
||||
GoodsIdStr string `json:"goods_id_str"` // 字符串类型的物品ID
|
||||
AppId string `json:"app_id"` // 所属业务ID
|
||||
ActId string `json:"act_id"` // 活动ID
|
||||
}
|
||||
|
||||
type GiftItem struct {
|
||||
Result int `json:"result"` // 1-奖励发放成功,2-奖励兑换失败(礼包发放背包环节成功,需要重新引导领奖) 3-针对只需要发背包,然后引导用户到人生应用背包领奖的奖励类型,发奖成功了 4-water错误(一般是orderid),不做兑换操作
|
||||
Water Water `json:"water"` // 礼包列表数据
|
||||
}
|
||||
|
||||
type CallbackReq struct {
|
||||
g.Meta `path:"/reward/callback" method:"post" tags:"Reward" summary:"(tencent)回调"`
|
||||
Uid string `json:"uid" v:"required#用户id不能为空" dc:"用户id"`
|
||||
OrderId string `json:"order_id" v:"required#流水订单id不能为空" dc:"用户领取流水订单"`
|
||||
PrizeChannelId string `json:"prize_channel_id" v:"required#奖品渠道id不能为空" dc:"奖品渠道id"`
|
||||
PrizeId string `json:"prize_id"`
|
||||
PrizeType uint32 `json:"prize_type"`
|
||||
PrizeSubType uint32 `json:"prize_sub_type"`
|
||||
Num uint32 `json:"num"`
|
||||
CustomInfo string `json:"custom_info"`
|
||||
}
|
||||
|
||||
type CallbackData struct {
|
||||
PrizeCode string `json:"prize_code"`
|
||||
Comment string `json:"comment"`
|
||||
}
|
||||
type CallbackRes struct {
|
||||
List interface{} `json:"list" dc:"物品列表"`
|
||||
Result int64 `json:"result" dc:"1-奖励发放成功,2-奖励兑换失败(礼包发放背包环节成功,需要重新引导领奖)3-针对只需要发背包,然后引导用户到人生应用背包领奖的奖励类型,发奖成功了,4-water错误(一般是orderid),不做兑换操作"`
|
||||
Water *Water `json:"water" dc:"礼包列表"`
|
||||
Errcode int32 `json:"errcode"`
|
||||
Errmsg string `json:"errmsg"`
|
||||
AppId string `json:"appid"`
|
||||
OrderId string `json:"order_id"`
|
||||
Datas []CallbackData `json:"data"`
|
||||
}
|
||||
|
||||
type GetLiftReq struct {
|
||||
@ -82,10 +196,7 @@ type GetLiftReq struct {
|
||||
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 {
|
||||
Water Water `json:"water" dc:"礼包列表"`
|
||||
}
|
||||
|
||||
type GetGoodsListReq struct {
|
||||
@ -97,6 +208,7 @@ type GetGoodsListReq struct {
|
||||
OrderType string `json:"orderType" dc:"winningtime:根据获取时间排序 overduetime:根据过期时间排序"`
|
||||
OrderbyDesc int64 `json:"orderbDesc" dc:"1:降序 2:升序"`
|
||||
Goodsstatus int64 `json:"Goodsstatus" dc:"查询的物品状态:0:查所有 2是已发放(成功和失败),4是未发放且未过期,6是未发放且已过期"`
|
||||
BindType int `json:"bindType" v:"required#绑定类型不能为空" dc:"绑定类型"`
|
||||
}
|
||||
|
||||
type GetGoodsListRes struct {
|
||||
|
||||
Reference in New Issue
Block a user