6
0
gaore-common-sdk-go/services/chat/role_ban_status.go

57 lines
1.8 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package chat
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
// RoleBanStatusRequest 角色封号/禁言状态查询(查 chat 的 gr_block 表)。
// 对应 chat 服务 POST /api/open/roleBanStatus验签走 form 参数 gkey/time/sign。
type RoleBanStatusRequest struct {
*requests.RpcRequest
Gkey string `position:"Body" field:"gkey"`
Time string `position:"Body" field:"time"`
Sign string `position:"Body" field:"sign"`
Roles string `position:"Body" field:"roles"` // JSON 数组字符串,每项 {gkey,role_id},单次最多 500 条
}
// RoleBanQuery 待查角色Roles 的 JSON 元素)
type RoleBanQuery struct {
Gkey string `json:"gkey"` // 游戏标识
RoleId string `json:"role_id"` // 角色 ID
}
// RoleBanStatusItem 单角色状态1=正常 2=封禁/禁言)
type RoleBanStatusItem struct {
RoleId string `json:"role_id"`
BanStatus int64 `json:"ban_status"` // 封号状态 1=正常 2=封禁
MuteStatus int64 `json:"mute_status"` // 禁言状态 1=正常 2=禁言
}
type RoleBanStatusResponse struct {
*responses.BaseResponse
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
List []RoleBanStatusItem `json:"list"`
} `json:"data"`
}
// CreateRoleBanStatusRequest 组装请求并完成 open 签名key 由调用方配置传入)。
func CreateRoleBanStatusRequest(gkey, key string) (req *RoleBanStatusRequest) {
req = &RoleBanStatusRequest{
RpcRequest: &requests.RpcRequest{},
}
req.InitWithApiInfo(HOST, VERSION, "/api/open/roleBanStatus")
req.Method = requests.POST
req.Gkey, req.Time, req.Sign = signOpenApi(gkey, key)
return
}
func CreateRoleBanStatusResponse() (response *RoleBanStatusResponse) {
response = &RoleBanStatusResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}