修改奖励物品详情查询

This commit is contained in:
chy
2025-06-23 16:54:08 +08:00
parent 3845da7511
commit 0019e65ebf
6 changed files with 32 additions and 11 deletions

View File

@ -230,12 +230,14 @@ type GetGoodsRes struct {
}
type GetGoodsDetailsReq struct {
g.Meta `path:"/reward/goodsDetails" method:"post" tags:"Reward" summary:"物品详情"`
g.Meta `path:"/reward/goodsDetails" method:"post" tags:"Reward" summary:"(PC)物品详情"`
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不需要"`
PopenId string `json:"popenId" v:"required#popenId不能为空" dc:"popenId不能为空"`
Gid int `json:"gid" v:"required#游戏id不能为空" dc:"游戏Id"`
}
type GetGoodsDetailsRes struct {
Water interface{} `json:"water" dc:"流水信息"`

View File

@ -10,12 +10,14 @@ import (
func (c *ControllerV1) GetGoodsDetails(ctx context.Context, req *v1.GetGoodsDetailsReq) (res *v1.GetGoodsDetailsRes, err error) {
out, err := service.Reward().GetGoodsDetails(ctx, &model.QueryUserGoodsDetailParam{
out, err := service.Reward().GetGoodsDetails(ctx, &model.GetGoodsDetailsIn{
WinningTime: req.Winningtime,
OrderId: req.Orderid,
IsActInfo: req.IsActinfo,
IsDetail: req.IsDetail,
IsDocument: req.IsDocument,
PopenId: req.PopenId,
Gid: req.Gid,
})
if err != nil {

View File

@ -416,10 +416,10 @@ func (s *sReward) GetGoods(ctx context.Context, in *model.GetGoodsGetIn) (out *m
}
// GetGoodsDetails 物品详情
func (s *sReward) GetGoodsDetails(ctx context.Context, in *model.QueryUserGoodsDetailParam) (out *model.QueryUserGoodsDetailResponse, err error) {
func (s *sReward) GetGoodsDetails(ctx context.Context, in *model.GetGoodsDetailsIn) (out *model.QueryUserGoodsDetailResponse, err error) {
//
activity, err := gamelife.GetGamelifeClient(ctx).RequestActivity(ctx, &model.QQNetbarActivityIn{ServiceName: consts.QueryUserGoodsDetail, QueryUserGoodsDetailParam: model.QueryUserGoodsDetailParam{
activity, err := gamelife.GetGamelifeClient(ctx).RequestActivity(ctx, &model.QQNetbarActivityIn{PopenId: in.PopenId, ServiceName: consts.QueryUserGoodsDetail, QueryUserGoodsDetailParam: model.QueryUserGoodsDetailParam{
Gid: in.Gid,
WinningTime: in.WinningTime,
OrderId: in.OrderId,

View File

@ -100,6 +100,12 @@ type RewardCallbackIn struct {
TaskId string
}
type RewardCallbackOut struct {
List interface{} `json:"list"`
Result int64 `json:"result"`
Water Water `json:"water"`
}
type GetRewardIn struct {
AreaId int
GameId int
@ -117,12 +123,6 @@ type GetRewardOut struct {
type Water struct {
}
type RewardCallbackOut struct {
List interface{} `json:"list"`
Result int64 `json:"result"`
Water Water `json:"water"`
}
type GetGoodsListIn struct {
Appfilter string `json:"appfilter"`
BigTime int64 `json:"bigTime"`
@ -146,7 +146,22 @@ type GetGoodsGetIn struct {
AreaId int64 `json:"areaId" dc:"大区Id"`
GameId int64 `json:"gid" dc:"游戏Id"`
RoleIdx string `json:"roleIdx" dc:"角色索引"`
PopenId string `json:"popenId" dc:"用户openId"`
}
type GoodsGetOut struct {
Water Water `json:"water" dc:"用户领取物品流水记录"`
}
type GetGoodsDetailsIn struct {
WinningTime int64 `json:"winningtime" dc:"用户领取礼包时间"`
OrderId string `json:"orderid" dc:"用户领取流水订单id"`
IsActInfo int64 `json:"isActinfo" dc:"是否需要活动相关信息 0默认需要 1不需要"`
IsDocument int64 `json:"isDocument" dc:"是否需要文档信息 0默认需要 1不需要"`
IsDetail int64 `json:"isDetail" dc:"是否需要物品详情 0默认需要 1不需要"`
PopenId string `json:"popenId" dc:"用户popenId"`
Gid int `json:"gid" dc:"游戏Id"`
}
type GetGoodsDetailsOut struct {
Goods Water `json:"goods" dc:"物品详情"`
}

View File

@ -20,13 +20,14 @@ type (
Delete(ctx context.Context, in *model.RewardDeleteIn) (out *model.RewardDeleteOut, err error)
// List 奖励列表
List(ctx context.Context, in *model.RewardListIn) (out *model.RewardListOut, err error)
// GetLift 领取奖励
GetLift(ctx context.Context, in *model.GetRewardIn) (out *model.GetRewardOut, err error)
// GetGoodsList 调用外部获取物品列表
GetGoodsList(ctx context.Context, in *model.GetGoodsListIn) (out *model.GetGoodsListOut, err error)
// GetGoods 物品兑换
GetGoods(ctx context.Context, in *model.GetGoodsGetIn) (out *model.GoodsGetOut, err error)
// GetGoodsDetails 物品详情
GetGoodsDetails(ctx context.Context, in *model.QueryUserGoodsDetailParam) (out *model.QueryUserGoodsDetailResponse, err error)
GetGoodsDetails(ctx context.Context, in *model.GetGoodsDetailsIn) (out *model.QueryUserGoodsDetailResponse, err error)
}
)

View File

@ -49,6 +49,7 @@ func init() {
enforcer.AddPolicy("guest", "/x/game", "GET", "获取游戏列表")
enforcer.AddPolicy("guest", "/x/reward/callback", "POST", "tencent奖励回调")
enforcer.AddPolicy("guest", "/x/reward/getLift", "POST", "tencent奖励领取")
enforcer.AddPolicy("guest", "/x/reward/goodsDetails", "POST", "获取物品详情")
}
// 用户
{