封装销号接口
This commit is contained in:
parent
f998dfec8c
commit
63d29af8fd
@ -2,11 +2,12 @@ package asdk
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/utils"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/utils"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -68,3 +69,10 @@ func (c *Client) GetLastLoginGame(req *LastLoginGameReq) (resp *LastLoginGameRes
|
|||||||
err = c.DoAction(req, resp)
|
err = c.DoAction(req, resp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cancellation 销号
|
||||||
|
func (c *Client) Cancellation(req *CancellationReq) (resp *CancellationResp, err error) {
|
||||||
|
resp = CreateCancellationResp()
|
||||||
|
err = c.DoAction(req, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
package asdk
|
package asdk
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/spf13/cast"
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
||||||
"strconv"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type KickUserReq struct {
|
type KickUserReq struct {
|
||||||
@ -43,3 +45,47 @@ func CreateKickUserResp() *KickUserResp {
|
|||||||
BaseResponse: &responses.BaseResponse{},
|
BaseResponse: &responses.BaseResponse{},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 销号
|
||||||
|
|
||||||
|
type CancellationReq struct {
|
||||||
|
*requests.RpcRequest
|
||||||
|
}
|
||||||
|
|
||||||
|
type CancellationResp struct {
|
||||||
|
*responses.BaseResponse
|
||||||
|
Code int `json:"code"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
|
Data struct{} `json:"data"`
|
||||||
|
TraceId string `json:"trace_id"`
|
||||||
|
}
|
||||||
|
type CancellationParam struct {
|
||||||
|
UserName string // 玩家名
|
||||||
|
Delay int64 // 冷静期时长
|
||||||
|
Operator string // 玩家名
|
||||||
|
Phone string // 手机号
|
||||||
|
Remark string // 备注
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateCancellationReq(data CancellationParam) *CancellationReq {
|
||||||
|
req := &CancellationReq{
|
||||||
|
&requests.RpcRequest{},
|
||||||
|
}
|
||||||
|
|
||||||
|
req.InitWithApiInfo(HOST, VERSION, "/api/kick")
|
||||||
|
req.Method = requests.GET
|
||||||
|
req.QueryParams = map[string]string{
|
||||||
|
"user_name": data.UserName,
|
||||||
|
"delay": cast.ToString(data.Delay),
|
||||||
|
"operator": data.Operator,
|
||||||
|
"phone": data.Phone,
|
||||||
|
"remark": data.Remark,
|
||||||
|
}
|
||||||
|
return req
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateCancellationResp() *CancellationResp {
|
||||||
|
return &CancellationResp{
|
||||||
|
BaseResponse: &responses.BaseResponse{},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user