新增游戏人生领取奖励相关接口
This commit is contained in:
@ -363,8 +363,8 @@ func (s *gamelifeClient) RequestActivity(ctx context.Context, in *model.QQNetbar
|
||||
return nil, ecode.Fail.Sub("请求出现异常")
|
||||
}
|
||||
return &result, nil
|
||||
case consts.GetUserGoodsList:
|
||||
value, err := dao.Games.Ctx(ctx).Where(do.Games{GameId: in.QueryUserGoodsDetailParam.Gid}).Fields(dao.Games.Columns().GameCode).Value()
|
||||
case consts.QueryUserGoodsList:
|
||||
value, err := dao.Games.Ctx(ctx).Where(do.Games{GameId: in.GoodsParam.Gid}).Fields(dao.Games.Columns().GameCode).Value()
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("获取游戏编码失败")
|
||||
}
|
||||
@ -374,13 +374,13 @@ func (s *gamelifeClient) RequestActivity(ctx context.Context, in *model.QQNetbar
|
||||
SetContext(ctx).
|
||||
SetBody(in.GoodsParam).
|
||||
SetResult(&result).
|
||||
Post(fmt.Sprintf("%s%s?%s", taskURL, consts.GetUserGoodsList, cache.Params))
|
||||
Post(fmt.Sprintf("%s%s?%s", taskURL, consts.QueryUserGoodsList, cache.Params))
|
||||
if err != nil || resp.IsError() {
|
||||
return nil, ecode.Fail.Sub("请求出现异常")
|
||||
}
|
||||
return &result, nil
|
||||
case consts.ExchangeGoods:
|
||||
value, err := dao.Games.Ctx(ctx).Where(do.Games{GameId: in.QueryUserGoodsDetailParam.Gid}).Fields(dao.Games.Columns().GameCode).Value()
|
||||
value, err := dao.Games.Ctx(ctx).Where(do.Games{GameId: in.ExchangeGoodsParam.Gid}).Fields(dao.Games.Columns().GameCode).Value()
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("获取游戏编码失败")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user