新增游戏人生领取奖励相关接口
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("获取游戏编码失败")
|
||||
}
|
||||
|
||||
@ -79,6 +79,9 @@ func init() {
|
||||
enforcer.AddPolicy("user", "/x/task/getLoginTaskList", "GET", "获取任务列表(已登录)")
|
||||
enforcer.AddPolicy("user", "/x/task/get", "POST", "领取任务")
|
||||
|
||||
// 奖励
|
||||
enforcer.AddPolicy("user", "/x/reward/goods", "GET", "获取物品列表")
|
||||
|
||||
}
|
||||
// 门店
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user