6
0
gaore-common-sdk-go/services/chat/violation_chat_list.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

64 lines
2.4 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"
)
// ViolationChatListRequest 违规聊天列表(仅 decision=BLOCK供 center-api 定时拉取)。
// 对应 chat 服务 POST /api/open/violationChatList验签走 form 参数 gkey/time/sign。
type ViolationChatListRequest struct {
*requests.RpcRequest
Gkey string `position:"Body" field:"gkey"`
Time string `position:"Body" field:"time"`
Sign string `position:"Body" field:"sign"`
DateStart string `position:"Body" field:"date_start"` // 起始时间 Y-m-d H:i:s
DateEnd string `position:"Body" field:"date_end"` // 截止时间 Y-m-d H:i:s
Page int64 `position:"Body" field:"page"` // 页码,从 1 起
Limit int64 `position:"Body" field:"limit"` // 每页条数,上限 500
}
// ViolationChatItem 单条违规聊天
type ViolationChatItem struct {
EsID string `json:"es_id"` // ES 文档 _id幂等依据
Username string `json:"username"` // 高热账号
Uid int64 `json:"uid"` // 高热用户 ID
Roleid string `json:"roleid"` // 角色 ID
Uname string `json:"uname"` // 角色名
Content string `json:"content"` // 聊天内容
GameSign string `json:"game_sign"` // 根游戏标识
ServerId string `json:"server_id"` // 区服
Type int64 `json:"type"` // 消息类型
ChatTime string `json:"chat_time"` // 聊天时间 Y-m-d H:i:s
Imei string `json:"imei"` // 设备号
Ip string `json:"ip"` // 发言 IP
}
type ViolationChatListResponse struct {
*responses.BaseResponse
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
Total int64 `json:"total"`
List []ViolationChatItem `json:"list"`
} `json:"data"`
}
// CreateViolationChatListRequest 组装请求并完成 open 签名key 由调用方配置传入)。
func CreateViolationChatListRequest(gkey, key string) (req *ViolationChatListRequest) {
req = &ViolationChatListRequest{
RpcRequest: &requests.RpcRequest{},
}
req.InitWithApiInfo(HOST, VERSION, "/api/open/violationChatList")
req.Method = requests.POST
req.Gkey, req.Time, req.Sign = signOpenApi(gkey, key)
return
}
func CreateViolationChatListResponse() (response *ViolationChatListResponse) {
response = &ViolationChatListResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}