Compare commits
No commits in common. "master" and "v1.2.79" have entirely different histories.
@ -53,13 +53,3 @@ func (c *Client) CreateRemoveBanRuleCacheReq(req *RemoveBanRuleCacheReq) (resp *
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateCheckBatchReq 批量检查用户是否被封禁
|
|
||||||
func (c *Client) CreateCheckBatchReq(req *CheckBatchReq) (resp *CheckBatchResp, err error) {
|
|
||||||
resp = CreateCheckBatchResp()
|
|
||||||
err = c.DoAction(req, resp)
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|||||||
@ -158,47 +158,3 @@ func CreateRemoveBanRuleCacheResp() *RemoveBanRuleCacheResp {
|
|||||||
BaseResponse: &responses.BaseResponse{},
|
BaseResponse: &responses.BaseResponse{},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// CheckBatchReq
|
|
||||||
// 批量检查用户是否被封禁(只读,按身份维度匹配现行封禁规则)
|
|
||||||
type CheckBatchReq struct {
|
|
||||||
*requests.JsonRequest
|
|
||||||
}
|
|
||||||
|
|
||||||
type CheckBatchReqParam struct {
|
|
||||||
UserNames []string `json:"user_names"` // 要检查的用户名列表
|
|
||||||
}
|
|
||||||
|
|
||||||
type CheckBatchItem struct {
|
|
||||||
UserName string `json:"user_name"` // 用户名
|
|
||||||
Ban bool `json:"ban"` // 是否被封禁
|
|
||||||
BanRuleId int64 `json:"ban_rule_id"` // 命中的封禁规则id(未命中为0)
|
|
||||||
BanEndTime string `json:"ban_end_time"` // 封禁结束时间(未命中为空)
|
|
||||||
}
|
|
||||||
|
|
||||||
type CheckBatchResp struct {
|
|
||||||
*responses.BaseResponse
|
|
||||||
Code int `json:"code"`
|
|
||||||
Msg string `json:"msg"`
|
|
||||||
Data struct {
|
|
||||||
List []CheckBatchItem `json:"list"`
|
|
||||||
} `json:"data"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateCheckBatchReq(param CheckBatchReqParam) *CheckBatchReq {
|
|
||||||
req := &CheckBatchReq{
|
|
||||||
&requests.JsonRequest{},
|
|
||||||
}
|
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/api/user_ban/check_batch")
|
|
||||||
req.Method = requests.POST
|
|
||||||
|
|
||||||
marshal, _ := json.Marshal(param)
|
|
||||||
_ = json.Unmarshal(marshal, &req.JsonParams)
|
|
||||||
return req
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateCheckBatchResp() *CheckBatchResp {
|
|
||||||
return &CheckBatchResp{
|
|
||||||
BaseResponse: &responses.BaseResponse{},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user