6
0
gaore-common-sdk-go/services/chat/role_ban_status.go
xuyang cb6b85f727 refactor(chat): 违规封禁三接口业务字段 gkey/sid 改规范名 game_sign/server_id
统一根游戏标识=game_sign、区服id=server_id(对齐DMS命名):
- BanAccountItem/ViolationChatItem: Gkey/Sid → GameSign/ServerId(json game_sign/server_id)
- RoleBanQuery: Gkey → GameSign
- 签名调用方字段 Request.Gkey(field:gkey,值=center-api)不动;chat_records(独立接口)不动
2026-07-22 17:02:25 +08:00

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 数组字符串,每项 {game_sign,role_id},单次最多 500 条
}
// RoleBanQuery 待查角色Roles 的 JSON 元素)
type RoleBanQuery struct {
GameSign string `json:"game_sign"` // 根游戏标识
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
}