281 lines
12 KiB
Go
281 lines
12 KiB
Go
package model
|
||
|
||
type Goods struct {
|
||
GoodsType int `json:"goodstype"`
|
||
GoodsName string `json:"goodsname"`
|
||
GoodsIcon string `json:"goodsicon"`
|
||
Num int `json:"num"`
|
||
}
|
||
|
||
type Prize struct {
|
||
Pic string `json:"pic"`
|
||
PrizeName string `json:"prize_name"`
|
||
GoodsList []Goods `json:"goods_list"`
|
||
}
|
||
|
||
type GameTaskConfig struct {
|
||
GameType int `json:"game_type"`
|
||
LimitQueue []string `json:"limit_queue"`
|
||
LimitMode []string `json:"limit_mode"`
|
||
Target int `json:"target"`
|
||
TimeType int `json:"time_type"`
|
||
LimitUserType []string `json:"limit_user_type"`
|
||
}
|
||
|
||
type GameTaskConfigParse struct {
|
||
Target string `json:"target"`
|
||
}
|
||
|
||
type GameTask struct {
|
||
RuleDesc string `json:"rule_desc"`
|
||
TaskDesc string `json:"task_desc"`
|
||
LimitPrize int `json:"limit_prize"`
|
||
LimitNum int `json:"limit_num"`
|
||
PrizeList []Prize `json:"prize_list"`
|
||
TaskID string `json:"task_id"`
|
||
Title string `json:"title"`
|
||
CycleStart int64 `json:"cycle_start"`
|
||
CycleEnd int64 `json:"cycle_end"`
|
||
TargetName string `json:"target_name"`
|
||
TargetTimes int `json:"target_times"`
|
||
Status int `json:"status,omitempty"`
|
||
UserTimes int64 `json:"user_times,omitempty"`
|
||
GameTaskConfig GameTaskConfig `json:"game_task_config"`
|
||
GameTaskConfigParse GameTaskConfigParse `json:"game_task_config_parse"`
|
||
}
|
||
|
||
type GameTaskResponse struct {
|
||
PageIdx string `json:"pageidx"`
|
||
TaskList []GameTask `json:"task_list"`
|
||
}
|
||
|
||
type TaskParam struct {
|
||
NetBarAccount string `json:"netbar_account"`
|
||
Pageidx string `json:"pageidx"`
|
||
Num int `json:"num"`
|
||
Gid int `json:"gid"`
|
||
BrandId string `json:"brand_id"`
|
||
Source string `json:"source"`
|
||
}
|
||
|
||
type UserRoleParam struct {
|
||
Area int `json:"area,omitempty"` // 可选参数
|
||
Gid int `json:"gid"`
|
||
}
|
||
type UserRole struct {
|
||
RoleName string `json:"role_name"`
|
||
RoleIdx string `json:"roleIdx"`
|
||
}
|
||
type UserRoleListResponse struct {
|
||
RoleList []UserRole `json:"role_list"`
|
||
}
|
||
type GiftParam struct {
|
||
TaskId string `json:"task_id"` // 任务ID,必填
|
||
AreaId int `json:"area_id,omitempty"` // 区域ID,
|
||
Gid int `json:"gid"` // 游戏ID,必填
|
||
RoleIdx string `json:"roleIdx,omitempty"` // 角色ID
|
||
}
|
||
|
||
type GoodsParam struct {
|
||
Gid int `json:"gid"` // 游戏ID,必填
|
||
AppFilter string `json:"appfilter"` // 按照gid过滤游戏
|
||
BigTime int64 `json:"big_time"` // 大时间:如果要控制时间范围,大的时间传这里,必填
|
||
Pageidx string `json:"pageidx"` // 页码, 首页为空
|
||
Num int `json:"num"` // 数量
|
||
OrderType string `json:"order_type"` // winningtime:根据获取时间排序 overduetime:根据过期时间排序
|
||
OrderByDesc bool `json:"orderby_desc"` // 降序
|
||
GoodsStatus int `json:"goodsstatus"` // 查询的物品状态:0:查所有 2是已发放(成功和失败),4是未发放且未过期,6是未发放且已过期
|
||
}
|
||
|
||
type GoodsResponse struct {
|
||
Waters []water `json:"waters"` // 兑换流水
|
||
PageIdx string `json:"pageidx"` // 下一页的页码
|
||
Total int64 `json:"total"` // 总数
|
||
}
|
||
|
||
type ExchangeGoodsParam struct {
|
||
Water water // 兑换流水
|
||
Gid int `json:"gid"` // 游戏ID,必填
|
||
AreaId int `json:"area_id"` // 区服 id
|
||
ReloIdx string `json:"reloidx"` //FIXME
|
||
}
|
||
type ExchangeGoodsResponse struct {
|
||
Water water // 兑换流水
|
||
}
|
||
type QueryUserGoodsDetailParam struct {
|
||
Gid int `json:"gid"`
|
||
WinningTime int64 `json:"winningtime"` // 用户领取礼包时间
|
||
OrderId string `json:"orderid"` // 户领取流水订单id
|
||
IsActInfo int64 `json:"is_actinfo"` // 是否需要活动相关信息 0:默认需要 1:不需要
|
||
IsDocument int64 `json:"is_document"` // 是否需要文案信息,使用限制信息、代金券图片、使用方式 0:默认需要 1:不需要
|
||
IsDetail int64 `json:"is_detail"` // 是否需要物品详情 0:默认需要 1:不需要
|
||
}
|
||
type QueryUserGoodsDetailResponse struct {
|
||
Water water // 兑换流水
|
||
}
|
||
type QQNetbarActivityIn struct {
|
||
ServiceName string // 服务名称
|
||
TaskParam TaskParam // 任务参数
|
||
UserRoleParam UserRoleParam // 查询用户角色
|
||
GiftParam GiftParam // 领取物品接口使用
|
||
GoodsParam GoodsParam // 查询物品列表接口使用
|
||
ExchangeGoodsParam ExchangeGoodsParam // 兑换物品接口使用
|
||
QueryUserGoodsDetailParam QueryUserGoodsDetailParam // 查询用户物品详情接口使用
|
||
PopenId string
|
||
BindType int
|
||
NickName string
|
||
}
|
||
|
||
type GiftResponse struct {
|
||
GiftItem []giftItem `json:"rst_list"`
|
||
}
|
||
|
||
type gameRoleInfo struct {
|
||
RoleIdx string `json:"roleIdx"`
|
||
RoleBaseInfo roleBaseInfo `json:"RoleBaseInfo"`
|
||
}
|
||
|
||
type roleBaseInfo struct {
|
||
Gid int `json:"gid"`
|
||
RoleIdx string `json:"roleidx"`
|
||
}
|
||
|
||
type userAddress struct {
|
||
// FIXME
|
||
}
|
||
|
||
type waterExtraInfo struct {
|
||
EchangeWaterLog echangeWaterLog `json:"echange_water_log"`
|
||
PremiumPrivInfo premiumPrivInfo `json:"premium_priv_info"`
|
||
SendOrderQuantity int `json:"send_order_quantity"`
|
||
}
|
||
|
||
type echangeWaterLog struct {
|
||
SrcChannel string `json:"src_channel"`
|
||
SrcModule string `json:"src_module"`
|
||
Source string `json:"source"`
|
||
CreateBrandId string `json:"create_brand_id"`
|
||
}
|
||
|
||
type premiumPrivInfo struct {
|
||
CustomInfo string `json:"custom_info"` // 字符串 JSON,可视需要二次解析
|
||
}
|
||
|
||
type goodsType int64
|
||
|
||
type goodsDisplayType struct {
|
||
// FIXME
|
||
}
|
||
|
||
type merchantInfo struct {
|
||
// FIXME
|
||
}
|
||
type olCouponCfg struct {
|
||
CouponReq couponReq `json:"coupon_req"`
|
||
}
|
||
type couponReq struct {
|
||
ReqContent reqContent `json:"reqContent"`
|
||
}
|
||
type reqContent struct {
|
||
CouponContent couponContent `json:"couponContent"`
|
||
}
|
||
type couponContent struct {
|
||
CouponNum string `json:"couponNum"`
|
||
}
|
||
type goodsBrandInfo struct {
|
||
BrandName string `json:"brand_name"`
|
||
JumpStatus int `json:"jump_status"`
|
||
BrandId string `json:"brand_id"`
|
||
BrandLogo string `json:"brand_logo"`
|
||
}
|
||
type expireConfig struct {
|
||
ExpireDays int `json:"expire_days"`
|
||
}
|
||
type privCoupon struct {
|
||
AppId string `json:"appid"`
|
||
PrizeChannelId string `json:"prize_channel_id"`
|
||
PrizeId string `json:"prize_id"`
|
||
PrizeType int `json:"prize_type"`
|
||
Num int `json:"num"`
|
||
Url string `json:"url"`
|
||
}
|
||
type goodsExtraInfo struct {
|
||
OlCouponCfg olCouponCfg `json:"olcoupon_cfg"`
|
||
GoodsBrandInfo goodsBrandInfo `json:"goods_brand_info"`
|
||
ExpireType int `json:"expire_type"`
|
||
ExpireConfig expireConfig `json:"expire_config"`
|
||
MprocJmpCfg map[string]any `json:"mproc_jmp_cfg"` // 空对象可用 map[string]any 表示
|
||
ApplyGoods string `json:"apply_goods"`
|
||
NewlyBuilt bool `json:"newly_built"`
|
||
PrivCoupon privCoupon `json:"priv_coupon"`
|
||
}
|
||
|
||
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"` // 礼包列表数据
|
||
}
|