2025-09-08 14:13:09 +08:00
|
|
|
package asdk
|
|
|
|
|
|
|
|
|
|
import (
|
2026-11-17 19:26:25 +08:00
|
|
|
"strconv"
|
|
|
|
|
|
|
|
|
|
"github.com/spf13/cast"
|
2025-09-08 14:13:09 +08:00
|
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
|
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type KickUserReq struct {
|
|
|
|
|
*requests.RpcRequest
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type KickUserResp struct {
|
|
|
|
|
*responses.BaseResponse
|
|
|
|
|
Code int `json:"code"`
|
|
|
|
|
Msg string `json:"msg"`
|
|
|
|
|
Data struct{} `json:"data"`
|
|
|
|
|
TraceId string `json:"trace_id"`
|
|
|
|
|
}
|
|
|
|
|
type KickUserParam struct {
|
|
|
|
|
Ts int64 `json:"ts"`
|
|
|
|
|
Sign string `json:"sign"`
|
|
|
|
|
UserName string `json:"user_name"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func CreateKickUserReq(data KickUserParam) *KickUserReq {
|
|
|
|
|
req := &KickUserReq{
|
|
|
|
|
&requests.RpcRequest{},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
req.InitWithApiInfo(HOST, VERSION, "/api/kick")
|
|
|
|
|
req.Method = requests.GET
|
|
|
|
|
req.QueryParams = map[string]string{
|
|
|
|
|
"ts": strconv.FormatInt(data.Ts, 10),
|
|
|
|
|
"sign": data.Sign,
|
|
|
|
|
"user_name": data.UserName,
|
|
|
|
|
}
|
|
|
|
|
return req
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func CreateKickUserResp() *KickUserResp {
|
|
|
|
|
return &KickUserResp{
|
|
|
|
|
BaseResponse: &responses.BaseResponse{},
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-11-17 19:26:25 +08:00
|
|
|
|
|
|
|
|
// 销号
|
|
|
|
|
|
|
|
|
|
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{},
|
|
|
|
|
}
|
|
|
|
|
}
|