2026-07-21 17:23:52 +08:00
|
|
|
|
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"` // 聊天内容
|
2026-07-22 17:02:25 +08:00
|
|
|
|
GameSign string `json:"game_sign"` // 根游戏标识
|
|
|
|
|
|
ServerId string `json:"server_id"` // 区服
|
2026-07-21 17:23:52 +08:00
|
|
|
|
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
|
|
|
|
|
|
}
|