新增游戏人生领取奖励相关接口
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 {
|
||||
|
||||
@ -14,7 +14,7 @@ const (
|
||||
GetTaskList = "GetTaskList"
|
||||
QueryUserRoleList = "QueryUserRoleList"
|
||||
GetGift = "GetGift"
|
||||
GetUserGoodsList = "GetUserGoodsList"
|
||||
QueryUserGoodsList = "QueryUserGoodsList"
|
||||
ExchangeGoods = "ExchangeGoods"
|
||||
QueryUserGoodsDetail = "QueryUserGoodsDetail"
|
||||
)
|
||||
|
||||
@ -2,10 +2,27 @@ package reward
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"server/api/reward/v1"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) Callback(ctx context.Context, req *v1.CallbackReq) (res *v1.CallbackRes, err error) {
|
||||
fromCtx := g.RequestFromCtx(ctx)
|
||||
appid := fromCtx.Header.Get("Custom-Data-Appid")
|
||||
timestamp := fromCtx.Header.Get("Custom-Data-Timestamp")
|
||||
nonce := fromCtx.Header.Get("Custom-Data-Nonce")
|
||||
auth := fromCtx.Header.Get("Custom-Data-Auth")
|
||||
|
||||
return nil, err
|
||||
data := fmt.Sprintf("%s%s%s%s%d%d%d%s%s%s#%s", req.Uid, req.OrderId, req.PrizeChannelId, req.PrizeId, req.PrizeType, req.PrizeSubType, req.Num, appid, timestamp, nonce, auth)
|
||||
stateOri := md5.Sum([]byte(data))
|
||||
state := hex.EncodeToString(stateOri[:])
|
||||
myAuth := strings.ToUpper(state)
|
||||
if myAuth != auth {
|
||||
return &v1.CallbackRes{Errcode: 252151000, OrderId: req.OrderId, Datas: []v1.CallbackData{{PrizeCode: req.OrderId}}}, err
|
||||
}
|
||||
return &v1.CallbackRes{Errcode: 0, OrderId: req.OrderId, Datas: []v1.CallbackData{{PrizeCode: req.OrderId}}}, err
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package reward
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"server/internal/model"
|
||||
"server/internal/service"
|
||||
|
||||
@ -9,6 +10,10 @@ import (
|
||||
)
|
||||
|
||||
func (c *ControllerV1) GetGoodsList(ctx context.Context, req *v1.GetGoodsListReq) (res *v1.GetGoodsListRes, err error) {
|
||||
|
||||
// 获取用户 id
|
||||
ctxVar := g.RequestFromCtx(ctx).GetCtxVar("id").Int64()
|
||||
|
||||
out, err := service.Reward().GetGoodsList(ctx, &model.GetGoodsListIn{
|
||||
Appfilter: req.Appfilter,
|
||||
BigTime: req.BigTime,
|
||||
@ -17,6 +22,8 @@ func (c *ControllerV1) GetGoodsList(ctx context.Context, req *v1.GetGoodsListReq
|
||||
OrderType: req.OrderType,
|
||||
OrderbyDesc: req.OrderbyDesc,
|
||||
Pageidx: req.Pageidx,
|
||||
UserId: ctxVar,
|
||||
BindType: req.BindType,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
|
||||
@ -2,27 +2,24 @@ package reward
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
"server/internal/service"
|
||||
|
||||
"server/api/reward/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) GetLift(ctx context.Context, req *v1.GetLiftReq) (res *v1.GetLiftRes, err error) {
|
||||
out, err := service.Reward().GetLift(ctx, &model.RewardCallbackIn{
|
||||
AreaId: req.AreaId,
|
||||
GameId: req.GameId,
|
||||
RewradTypeId: req.RewradType,
|
||||
RoleIdx: req.RoleIdx,
|
||||
TaskId: req.TaskId,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &v1.GetLiftRes{
|
||||
List: out.List,
|
||||
Result: out.Result,
|
||||
Water: nil,
|
||||
}, nil
|
||||
//out, err := service.Reward().GetLift(ctx, &model.GetGoodsGetIn{
|
||||
// AreaId: req.AreaId,
|
||||
// GameId: req.GameId,
|
||||
// RewradTypeId: req.RewradType,
|
||||
// RoleIdx: req.RoleIdx,
|
||||
// TaskId: req.TaskId,
|
||||
//})
|
||||
//
|
||||
//if err != nil {
|
||||
// return nil, err
|
||||
//}
|
||||
//return &v1.GetLiftRes{
|
||||
// List: out.List,
|
||||
// Result: out.Result,
|
||||
//}, nil
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import (
|
||||
"server/internal/model/do"
|
||||
"server/internal/service"
|
||||
"server/utility/ecode"
|
||||
"server/utility/gamelife"
|
||||
)
|
||||
|
||||
type sReward struct{}
|
||||
@ -321,17 +322,32 @@ func (s *sReward) List(ctx context.Context, in *model.RewardListIn) (out *model.
|
||||
func (s *sReward) GetLift(ctx context.Context, in *model.RewardCallbackIn) (out *model.RewardCallbackOut, err error) {
|
||||
|
||||
// 遍历奖励类型列表
|
||||
for _, v := range in.RewradTypeId {
|
||||
if v > 0 {
|
||||
// 发背包+兑换
|
||||
//for _, v := range in.RewradTypeId {
|
||||
// if v > 0 {
|
||||
// // 发背包+兑换
|
||||
//
|
||||
// }
|
||||
// if v > 0 {
|
||||
// // 直接发背包
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
if v > 0 {
|
||||
// 直接发背包
|
||||
}
|
||||
activity, err := gamelife.GetGamelifeClient(ctx).RequestActivity(ctx, &model.QQNetbarActivityIn{ServiceName: consts.GetGift, GiftParam: model.GiftParam{
|
||||
TaskId: in.TaskId,
|
||||
AreaId: in.AreaId,
|
||||
Gid: in.GameId,
|
||||
RoleIdx: in.RoleIdx,
|
||||
}})
|
||||
|
||||
_, ok := activity.(*model.GiftResponse)
|
||||
if !ok {
|
||||
return nil, ecode.Fail.Sub("数据类型转换失败")
|
||||
}
|
||||
|
||||
// 存储数据库记录
|
||||
//for _, item := range result.GiftItem {
|
||||
// item.Result
|
||||
//}
|
||||
|
||||
return nil, err
|
||||
}
|
||||
@ -339,9 +355,39 @@ func (s *sReward) GetLift(ctx context.Context, in *model.RewardCallbackIn) (out
|
||||
// GetGoodsList 调用外部获取物品列表
|
||||
func (s *sReward) GetGoodsList(ctx context.Context, in *model.GetGoodsListIn) (out *model.GetGoodsListOut, err error) {
|
||||
|
||||
// 调用 tencent
|
||||
var user model.User
|
||||
// 查询用户信息
|
||||
//err = dao.Users.Ctx(ctx).Where(do.Users{Id: in.UserId}).Scan(&user)
|
||||
err = dao.Users.Ctx(ctx).Where(do.Users{Id: 19}).Scan(&user)
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("查询用户失败")
|
||||
}
|
||||
var pOpenId string
|
||||
// 判断绑定类型 QQ还是WX
|
||||
if in.BindType == 1 {
|
||||
pOpenId = user.QQPopenId
|
||||
} else {
|
||||
pOpenId = user.WXPopenId
|
||||
}
|
||||
|
||||
return nil, err
|
||||
// 调用 tencent
|
||||
result, err := gamelife.GetGamelifeClient(ctx).RequestActivity(ctx, &model.QQNetbarActivityIn{ServiceName: consts.QueryUserGoodsList, BindType: in.BindType,
|
||||
GoodsParam: model.GoodsParam{AppFilter: in.Appfilter, BigTime: in.BigTime, GoodsStatus: int(in.Goodsstatus), Num: int(in.Num), OrderByDesc: true, OrderType: in.OrderType, Pageidx: in.Pageidx, Gid: 26},
|
||||
PopenId: pOpenId, NickName: user.Nickname})
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("请求失败")
|
||||
}
|
||||
|
||||
response, ok := result.(*model.GoodsResponse)
|
||||
if !ok {
|
||||
return nil, ecode.Fail.Sub("类型断言失败")
|
||||
}
|
||||
|
||||
return &model.GetGoodsListOut{
|
||||
List: response.Waters,
|
||||
Pageidx: response.PageIdx,
|
||||
Total: response.Total,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// GetGoods 物品兑换
|
||||
|
||||
@ -38,10 +38,6 @@ func (s *sTask) UserTaskRankingList(ctx context.Context, in *model.UserTaskRanki
|
||||
start = time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, now.Location())
|
||||
// 当天结束时间
|
||||
end = time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 0, now.Location())
|
||||
|
||||
fmt.Println("开始时间:", start)
|
||||
fmt.Println("结束时间:", end)
|
||||
|
||||
} else if in.Type == 2 {
|
||||
// 周
|
||||
now := time.Now()
|
||||
|
||||
@ -127,7 +127,7 @@ type QQNetbarActivityIn struct {
|
||||
}
|
||||
|
||||
type GiftResponse struct {
|
||||
GiftItem giftItem `json:"rst_list"`
|
||||
GiftItem []giftItem `json:"rst_list"`
|
||||
}
|
||||
|
||||
type gameRoleInfo struct {
|
||||
|
||||
@ -93,11 +93,11 @@ type RewardListOut struct {
|
||||
|
||||
// RewardCallbackIn 任务奖励领取回调入参
|
||||
type RewardCallbackIn struct {
|
||||
AreaId int64
|
||||
GameId int64
|
||||
RewradTypeId []int64
|
||||
AreaId int
|
||||
GameId int
|
||||
RewradTypeId []int
|
||||
RoleIdx string
|
||||
TaskId int64
|
||||
TaskId string
|
||||
}
|
||||
|
||||
type Water struct {
|
||||
@ -116,7 +116,9 @@ type GetGoodsListIn struct {
|
||||
Num int64 `json:"num"`
|
||||
OrderType string `json:"orderType"`
|
||||
OrderbyDesc int64 `json:"orderbDesc"`
|
||||
Goodsstatus int64 `json:"Goodsstatus"`
|
||||
Goodsstatus int64 `json:"goodsstatus"`
|
||||
BindType int `json:"bindType"`
|
||||
UserId int64 `json:"userId"`
|
||||
}
|
||||
|
||||
type GetGoodsListOut struct {
|
||||
|
||||
@ -24,6 +24,8 @@ type User struct {
|
||||
LastLoginStoreId int `json:"lastLoginStoreId" orm:"last_login_store_id"` // 最后登录门店ID
|
||||
LastLoginStoreName string `json:"lastLoginStoreName" orm:"last_login_store_name"` // 最后登录门店名称
|
||||
FirstVisitAt *gtime.Time `json:"firstVisitAt" orm:"first_visit_at"` // 首次访问时间
|
||||
QQPopenId string `json:"qqpopenid" orm:"qqpopenid"`
|
||||
WXPopenId string `json:"wxpopenid" orm:"wxpopenid"`
|
||||
}
|
||||
|
||||
// UserCreateIn 创建用户请求
|
||||
|
||||
@ -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