game 服务新增 GetPaySwitchUser(按 user_name+game_id 读 db_center 切支付名单,返回 status+risk_level); asdk 服务新增 ClearPaySwitchCache(内网无签名,按 user_name+game_id 即时清切支付判定缓存)。 供 asdk/center 微信小游戏切支付功能调用。
43 lines
1.2 KiB
Go
43 lines
1.2 KiB
Go
package asdk
|
||
|
||
import (
|
||
"strconv"
|
||
|
||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
||
)
|
||
|
||
// ClearPaySwitchCacheReq
|
||
// 清切支付名单判定缓存请求(内网无签名接口,按 user_name + game_id 即时清 asdk 判定缓存)
|
||
type ClearPaySwitchCacheReq struct {
|
||
*requests.RpcRequest
|
||
}
|
||
|
||
type ClearPaySwitchCacheResp struct {
|
||
*responses.BaseResponse
|
||
Code int `json:"code"`
|
||
Msg string `json:"msg"`
|
||
Data struct{} `json:"data"`
|
||
TraceId string `json:"trace_id"`
|
||
}
|
||
|
||
// CreateClearPaySwitchCacheReq 构造清缓存请求(user_name + game_id)
|
||
func CreateClearPaySwitchCacheReq(userName string, gameId int64) *ClearPaySwitchCacheReq {
|
||
req := &ClearPaySwitchCacheReq{
|
||
RpcRequest: &requests.RpcRequest{},
|
||
}
|
||
req.InitWithApiInfo(HOST, VERSION, "/api/vip/clear_pay_switch_cache")
|
||
req.Method = requests.POST
|
||
req.FormParams = map[string]string{
|
||
"user_name": userName,
|
||
"game_id": strconv.FormatInt(gameId, 10),
|
||
}
|
||
return req
|
||
}
|
||
|
||
func CreateClearPaySwitchCacheResp() *ClearPaySwitchCacheResp {
|
||
return &ClearPaySwitchCacheResp{
|
||
BaseResponse: &responses.BaseResponse{},
|
||
}
|
||
}
|