完成游戏人生账号绑定、解绑、绑定信息的接口开发

This commit is contained in:
2025-06-09 16:27:18 +08:00
parent 5ead851b99
commit fee4d55725
27 changed files with 764 additions and 25 deletions

15
api/task/task.go Normal file
View File

@ -0,0 +1,15 @@
// =================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package task
import (
"context"
"server/api/task/v1"
)
type ITaskV1 interface {
Ranking(ctx context.Context, req *v1.RankingReq) (res *v1.RankingRes, err error)
}

View File

@ -2,14 +2,17 @@ package v1
import "github.com/gogf/gf/v2/frame/g"
type TaskListReq struct {
}
type TaskRankingReq struct {
type RankingReq struct {
g.Meta `path:"/task/ranking" method:"get" tags:"Task" summary:"任务排行榜"`
StoreId int `json:"storeId" v:"required#请选择店铺" dc:"门店id"`
Page int `json:"page" dc:"页数"`
Size int `json:"size" dc:"条数"`
}
type TaskRankingRes struct {
type RankingRes struct {
}
type ListReq struct {
}
type ListRes struct {
}

View File

@ -16,4 +16,7 @@ type IUserV1 interface {
Update(ctx context.Context, req *v1.UpdateReq) (res *v1.UpdateRes, err error)
BindPhone(ctx context.Context, req *v1.BindPhoneReq) (res *v1.BindPhoneRes, err error)
GetPhoneCode(ctx context.Context, req *v1.GetPhoneCodeReq) (res *v1.GetPhoneCodeRes, err error)
GetUserBoundInfo(ctx context.Context, req *v1.GetUserBoundInfoReq) (res *v1.GetUserBoundInfoRes, err error)
GetBoundUrl(ctx context.Context, req *v1.GetBoundUrlReq) (res *v1.GetBoundUrlRes, err error)
GetUnboundUrl(ctx context.Context, req *v1.GetUnboundUrlReq) (res *v1.GetUnboundUrlRes, err error)
}

View File

@ -58,20 +58,31 @@ type GetPhoneCodeReq struct {
type GetPhoneCodeRes struct {
Success bool `json:"success" dc:"是否成功"`
}
type GetGameLifeBondReq struct {
g.Meta `path:"/user/getGameLifeBond" method:"post" tags:"User" summary:"获取GameLife绑定情况"`
type GetUserBoundInfoReq struct {
g.Meta `path:"/user/boundInfo" method:"get" tags:"User" summary:"获取用户绑定信息"`
PopenId string `json:"popenId" v:"required#popenId不能为空" dc:"用户详情接口返回的 wxPopenId 或者是 qqPopenId"`
}
type GetGameLifeBondRes struct {
type GetUserBoundInfoRes struct {
IsBound bool `json:"isBound" dc:"是否已绑定"`
}
type BundleGameLifeReq struct {
g.Meta `path:"/user/bindGameLife" method:"post" tags:"User" summary:"绑定GameLife账号"`
type GetBoundUrlReq struct {
g.Meta `path:"/user/boundUrl" method:"get" tags:"User" summary:"获取用户绑定url"`
PopenId string `json:"popenId" v:"required#popenId不能为空" dc:"用户详情接口返回的 wxPopenId 或者是 qqPopenId"`
BindType int `json:"bindType" v:"required|in:1,2#请选择绑定方式只能为1或2" dc:"绑定方式默认值11: qq; 2: wx" default:"1"`
AppName string `json:"appName" v:"required#请选择游戏" dc:"游戏名称"`
}
type BundleGameLifeRes struct {
Url string `json:"url" dc:"绑定游戏人生的 h5 页面 url"`
type GetBoundUrlRes struct {
Url string `json:"url" dc:"绑定的 h5 页面 url"`
}
type UnbundleGameLifeReq struct {
g.Meta `path:"/user/unbindGameLife" method:"post" tags:"User" summary:"解绑GameLife账号"`
type GetUnboundUrlReq struct {
g.Meta `path:"/user/unBoundUrl" method:"get" tags:"User" summary:"获取用户解绑url"`
PopenId string `json:"popenId" v:"required#popenId不能为空" dc:"用户详情接口返回的 wxPopenId 或者是 qqPopenId"`
BindType int `json:"bindType" v:"required|in:1,2#请选择绑定方式只能为1或2" dc:"绑定方式默认值11: qq; 2: wx" default:"1"`
AppName string `json:"appName" v:"required#请选择游戏" dc:"游戏名称"`
Nickname string `json:"nickname" v:"required#昵称不能为空" dc:"昵称"`
}
type UnbundleGameLifeRes struct {
Url string `json:"url" dc:"解绑游戏人生的 h5 页面 url"`
type GetUnboundUrlRes struct {
Url string `json:"url" dc:"解绑的 h5 页面 url"`
}