Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e30ecac33b | ||
|
b06b846be7 | ||
|
22551147eb | ||
ade7ca2d03 | |||
|
51e0eaec33 | ||
f3ab307f18 | |||
28d51baaab | |||
|
d283be207b | ||
f902dccb54 | |||
|
2622e7c3c9 | ||
|
13bf104d52 | ||
|
083c5a7ba1 |
@ -46,6 +46,27 @@ type Client struct {
|
|||||||
httpProxy string
|
httpProxy string
|
||||||
httpsProxy string
|
httpsProxy string
|
||||||
noProxy string
|
noProxy string
|
||||||
|
|
||||||
|
header *requests.RefererHeader
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Client) SetRefererHeader(header *requests.RefererHeader) {
|
||||||
|
c.header = header
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Client) GetRefererHeader() map[string]string {
|
||||||
|
var header *requests.RefererHeader
|
||||||
|
if c.header == nil {
|
||||||
|
header = &requests.RefererHeader{
|
||||||
|
TraceId: utils.MakeTraceId(),
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
header = c.header
|
||||||
|
}
|
||||||
|
return map[string]string{
|
||||||
|
"Referer": header.Referer,
|
||||||
|
"Traceparent": header.TraceId,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (client *Client) GetNoProxy() string {
|
func (client *Client) GetNoProxy() string {
|
||||||
@ -218,7 +239,7 @@ func (client *Client) DoAction(request requests.AcsRequest, response responses.A
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (client *Client) DoActionWithSigner(request requests.AcsRequest, response responses.AcsResponse, signer auth.Signer) (err error) {
|
func (client *Client) DoActionWithSigner(request requests.AcsRequest, response responses.AcsResponse, signer auth.Signer) (err error) {
|
||||||
|
request.AddHeaders(client.GetRefererHeader())
|
||||||
httpRequest, err := client.buildRequestWithSigner(request, signer)
|
httpRequest, err := client.buildRequestWithSigner(request, signer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -56,6 +56,11 @@ type Host struct {
|
|||||||
Func func(string) string
|
Func func(string) string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RefererHeader struct {
|
||||||
|
Referer string
|
||||||
|
TraceId string
|
||||||
|
}
|
||||||
|
|
||||||
var debug utils.Debug
|
var debug utils.Debug
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -95,6 +100,7 @@ type AcsRequest interface {
|
|||||||
GetBodyReader() io.Reader
|
GetBodyReader() io.Reader
|
||||||
|
|
||||||
AddHeaderParam(key, value string)
|
AddHeaderParam(key, value string)
|
||||||
|
AddHeaders(headers map[string]string)
|
||||||
addQueryParam(key, value string)
|
addQueryParam(key, value string)
|
||||||
addFormParam(key, value string)
|
addFormParam(key, value string)
|
||||||
addJsonParam(string, any)
|
addJsonParam(string, any)
|
||||||
@ -226,6 +232,12 @@ func (request *baseRequest) AddHeaderParam(key, val string) {
|
|||||||
request.Headers[key] = val
|
request.Headers[key] = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (request *baseRequest) AddHeaders(headers map[string]string) {
|
||||||
|
for key, val := range headers {
|
||||||
|
request.Headers[key] = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (request *baseRequest) addQueryParam(key, val string) {
|
func (request *baseRequest) addQueryParam(key, val string) {
|
||||||
request.QueryParams[key] = val
|
request.QueryParams[key] = val
|
||||||
}
|
}
|
||||||
|
69
sdk/utils/random/str_random.go
Normal file
69
sdk/utils/random/str_random.go
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
package random
|
||||||
|
|
||||||
|
import (
|
||||||
|
"math/rand"
|
||||||
|
"time"
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Mode int // 随机数模式
|
||||||
|
|
||||||
|
const (
|
||||||
|
Letter Mode = iota
|
||||||
|
Number
|
||||||
|
LetterNumber
|
||||||
|
LetterHex
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
|
numbers = "0123456789"
|
||||||
|
lettersHex = "0123456789abcdef"
|
||||||
|
letterIdBit = 6
|
||||||
|
letterIdxMask = 1<<letterIdBit - 1
|
||||||
|
letterIdxMax = 63 / letterIdBit
|
||||||
|
)
|
||||||
|
|
||||||
|
func StrRandom(n int64) string {
|
||||||
|
return Random(n, Letter)
|
||||||
|
}
|
||||||
|
|
||||||
|
func NumRandom(n int64) string {
|
||||||
|
return Random(n, Number)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Random(n int64, mode ...Mode) string {
|
||||||
|
var baseStr string
|
||||||
|
mode = append(mode, LetterNumber)
|
||||||
|
switch mode[0] {
|
||||||
|
case LetterHex:
|
||||||
|
baseStr = lettersHex
|
||||||
|
case Letter:
|
||||||
|
baseStr = letters
|
||||||
|
case Number:
|
||||||
|
baseStr = numbers
|
||||||
|
case LetterNumber:
|
||||||
|
fallthrough
|
||||||
|
default:
|
||||||
|
baseStr = letters + numbers
|
||||||
|
}
|
||||||
|
return random(n, baseStr)
|
||||||
|
}
|
||||||
|
|
||||||
|
func random(n int64, baseStr string) string {
|
||||||
|
|
||||||
|
var src = rand.NewSource(time.Now().UnixNano())
|
||||||
|
b := make([]byte, n)
|
||||||
|
for i, cache, remain := n-1, src.Int63(), letterIdxMax; i >= 0; {
|
||||||
|
if remain == 0 {
|
||||||
|
cache, remain = src.Int63(), letterIdxMax
|
||||||
|
}
|
||||||
|
if idx := int(cache & letterIdxMask); idx < len(baseStr) {
|
||||||
|
b[i] = baseStr[idx]
|
||||||
|
i--
|
||||||
|
}
|
||||||
|
cache >>= letterIdBit
|
||||||
|
remain--
|
||||||
|
}
|
||||||
|
return *(*string)(unsafe.Pointer(&b))
|
||||||
|
}
|
@ -5,8 +5,8 @@ import (
|
|||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/utils/random"
|
||||||
"hash"
|
"hash"
|
||||||
rand2 "math/rand"
|
|
||||||
"net/url"
|
"net/url"
|
||||||
"reflect"
|
"reflect"
|
||||||
"sort"
|
"sort"
|
||||||
@ -36,11 +36,7 @@ func NewUUID() UUID {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RandStringBytes(n int) string {
|
func RandStringBytes(n int) string {
|
||||||
b := make([]byte, n)
|
return random.StrRandom(int64(n))
|
||||||
for i := range b {
|
|
||||||
b[i] = letterBytes[rand2.Intn(len(letterBytes))]
|
|
||||||
}
|
|
||||||
return string(b)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func newFromHash(h hash.Hash, ns UUID, name string) UUID {
|
func newFromHash(h hash.Hash, ns UUID, name string) UUID {
|
||||||
@ -114,3 +110,7 @@ func Md5(data string) string {
|
|||||||
s := md5.Sum([]byte(data))
|
s := md5.Sum([]byte(data))
|
||||||
return hex.EncodeToString(s[:])
|
return hex.EncodeToString(s[:])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func MakeTraceId() string {
|
||||||
|
return fmt.Sprintf("00-%s-%s-01", random.Random(32, random.LetterHex), random.Random(16, random.LetterHex))
|
||||||
|
}
|
||||||
|
@ -34,6 +34,11 @@ type OrderRecord struct {
|
|||||||
OrderParts []*OrderSubmitPart `json:"order_parts"`
|
OrderParts []*OrderSubmitPart `json:"order_parts"`
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
WorkOrderTemplateFirstLevelId int64 `json:"work_order_template_first_level_id"`
|
WorkOrderTemplateFirstLevelId int64 `json:"work_order_template_first_level_id"`
|
||||||
|
WorkOrderTemplateId int64 `json:"work_order_template_id"`
|
||||||
|
WorkOrderTemplateName string `json:"work_order_template_name"`
|
||||||
|
Uid int64 `json:"uid"`
|
||||||
|
OrderStatus string `json:"order_status"`
|
||||||
|
OrderStatusName string `json:"order_status_name"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PageInfoResp 分页响应
|
// PageInfoResp 分页响应
|
||||||
|
@ -102,3 +102,10 @@ func (c *Client) GetRealAuthBlackList(req *GetRealAuthBlackListReq) (resp *GetRe
|
|||||||
err = c.DoAction(req, resp)
|
err = c.DoAction(req, resp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameRealAuthInfo 获取实名参数
|
||||||
|
func (c *Client) GetGameRealAuthInfo(req *GetGameRealAuthInfoReq) (resp *GetGameRealAuthInfoResp, err error) {
|
||||||
|
resp = CreateGetGameRealAuthInfoResp()
|
||||||
|
err = c.DoAction(req, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -164,3 +164,18 @@ func TestGetRealAuthBlackList(t *testing.T) {
|
|||||||
}
|
}
|
||||||
t.Log(isBlockOutIos)
|
t.Log(isBlockOutIos)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取游戏实名参数
|
||||||
|
func TestGetGameRealAuthInfo(t *testing.T) {
|
||||||
|
client, err := NewClient()
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
getGameRealAuthInfoReq := CreateGetGameRealAuthInfoReq(7081)
|
||||||
|
isBlockOutIos, err := client.GetGameRealAuthInfo(getGameRealAuthInfoReq)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
t.Log(isBlockOutIos)
|
||||||
|
}
|
||||||
|
@ -103,6 +103,9 @@ type GameInfoData struct {
|
|||||||
FlashPassKey string `json:"flash_pass_key"`
|
FlashPassKey string `json:"flash_pass_key"`
|
||||||
GameByname string `json:"game_byname"`
|
GameByname string `json:"game_byname"`
|
||||||
GameIconImg string `json:"game_icon_img"`
|
GameIconImg string `json:"game_icon_img"`
|
||||||
|
GameImage string `json:"game_image"`
|
||||||
|
GameHomeImage string `json:"game_home_image"`
|
||||||
|
GameHomeShortImage string `json:"game_home_short_image"`
|
||||||
GameSign string `json:"game_sign"`
|
GameSign string `json:"game_sign"`
|
||||||
GameTsUrl string `json:"game_ts_url"`
|
GameTsUrl string `json:"game_ts_url"`
|
||||||
GameVersion string `json:"game_version"`
|
GameVersion string `json:"game_version"`
|
||||||
@ -390,3 +393,48 @@ func CreateGetRealAuthBlackListResp() *GetRealAuthBlackListResp {
|
|||||||
BaseResponse: &responses.BaseResponse{},
|
BaseResponse: &responses.BaseResponse{},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGameRealAuthInfoReq
|
||||||
|
// 获取实名参数
|
||||||
|
type GetGameRealAuthInfoReq struct {
|
||||||
|
*requests.RpcRequest
|
||||||
|
GameId int64 `position:"Body" field:"game_id" default:"-" `
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetGameRealAuthInfoRespData struct {
|
||||||
|
GroupName string `json:"group_name"`
|
||||||
|
GroupDescription int `json:"group_description"`
|
||||||
|
VerifiedTime string `json:"verified_time"`
|
||||||
|
AreaProvince string `json:"area_province"`
|
||||||
|
VersionInfo string `json:"version_info"`
|
||||||
|
IsReal int `json:"is_real"`
|
||||||
|
IsDirect int `json:"is_direct"`
|
||||||
|
AuthChannel string `json:"auth_channel"`
|
||||||
|
StandbyAuthChannel string `json:"standby_auth_channel"`
|
||||||
|
ProtectTime int `json:"protect_time"`
|
||||||
|
GovIoReport int `json:"gov_io_report"`
|
||||||
|
MinorBan int `json:"minor_ban"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetGameRealAuthInfoResp struct {
|
||||||
|
*responses.BaseResponse
|
||||||
|
Code int `json:"code"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
|
Data GetGameRealAuthInfoRespData `json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateGetGameRealAuthInfoReq(gameId int64) *GetGameRealAuthInfoReq {
|
||||||
|
req := &GetGameRealAuthInfoReq{
|
||||||
|
RpcRequest: &requests.RpcRequest{},
|
||||||
|
GameId: gameId,
|
||||||
|
}
|
||||||
|
req.InitWithApiInfo(HOST, VERSION, "/api/login/getGameRealAuthInfo")
|
||||||
|
req.Method = requests.POST
|
||||||
|
return req
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateGetGameRealAuthInfoResp() *GetGameRealAuthInfoResp {
|
||||||
|
return &GetGameRealAuthInfoResp{
|
||||||
|
BaseResponse: &responses.BaseResponse{},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package msdk
|
package msdk
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||||
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/utils"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -20,11 +22,17 @@ func TestClient_GetUserAttr(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGetIdfa(t *testing.T) {
|
func TestGetIdfa(t *testing.T) {
|
||||||
|
header := &requests.RefererHeader{
|
||||||
|
Referer: "https://www.gaore.com",
|
||||||
|
TraceId: utils.MakeTraceId(),
|
||||||
|
}
|
||||||
|
_ = header
|
||||||
client, err := NewClient()
|
client, err := NewClient()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
client.SetRefererHeader(header)
|
||||||
req := CreateGetIdfaReq()
|
req := CreateGetIdfaReq()
|
||||||
req.ChannelId = 1
|
req.ChannelId = 1
|
||||||
req.GameId = 3706
|
req.GameId = 3706
|
||||||
|
@ -63,7 +63,7 @@ func CreateGetIdfaReq() *GetIdfaReq {
|
|||||||
req := &GetIdfaReq{
|
req := &GetIdfaReq{
|
||||||
RpcRequest: &requests.RpcRequest{},
|
RpcRequest: &requests.RpcRequest{},
|
||||||
}
|
}
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/getIdfa.php")
|
req.InitWithApiInfo(HOST, VERSION, "/getidfa.php")
|
||||||
req.Method = requests.GET
|
req.Method = requests.GET
|
||||||
return req
|
return req
|
||||||
}
|
}
|
||||||
@ -173,7 +173,7 @@ func CreateGetImeiReq() *GetImeiReq {
|
|||||||
req := &GetImeiReq{
|
req := &GetImeiReq{
|
||||||
RpcRequest: &requests.RpcRequest{},
|
RpcRequest: &requests.RpcRequest{},
|
||||||
}
|
}
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/getImei.php")
|
req.InitWithApiInfo(HOST, VERSION, "/getimei.php")
|
||||||
req.Method = requests.GET
|
req.Method = requests.GET
|
||||||
return req
|
return req
|
||||||
}
|
}
|
||||||
@ -212,7 +212,7 @@ func CreateSetImeiReq() *SetImeiReq {
|
|||||||
req := &SetImeiReq{
|
req := &SetImeiReq{
|
||||||
RpcRequest: &requests.RpcRequest{},
|
RpcRequest: &requests.RpcRequest{},
|
||||||
}
|
}
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/setImei.php")
|
req.InitWithApiInfo(HOST, VERSION, "/setimei.php")
|
||||||
req.Method = requests.GET
|
req.Method = requests.GET
|
||||||
return req
|
return req
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package passport
|
|||||||
import (
|
import (
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -40,3 +41,17 @@ func (c *Client) GetUserRoleList(req *GetUserRoleListRequest) (response *GetUser
|
|||||||
err = c.DoAction(req, response)
|
err = c.DoAction(req, response)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// EditCard
|
||||||
|
// 新增或修改实名信息
|
||||||
|
func (c *Client) EditCard(req EditCardRequestParam) (response string, err error) {
|
||||||
|
editCardRequest := CreateEditCardRequest(req)
|
||||||
|
createEditCardResponse := CreateEditCardResponse()
|
||||||
|
err = c.DoAction(editCardRequest, createEditCardResponse)
|
||||||
|
if err != nil && strings.Contains(err.Error(), "json Unmarshal:") {
|
||||||
|
return createEditCardResponse.GetHttpContentString(), nil
|
||||||
|
} else if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return createEditCardResponse.GetHttpContentString(), nil
|
||||||
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package passport
|
package passport
|
||||||
|
|
||||||
import "testing"
|
import (
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
// 单元测试
|
// 单元测试
|
||||||
|
|
||||||
@ -31,3 +33,30 @@ func TestGetUserRoleList(t *testing.T) {
|
|||||||
t.Logf("resp code:%+v", resp.Code)
|
t.Logf("resp code:%+v", resp.Code)
|
||||||
t.Logf("resp data:%+v", resp.Data)
|
t.Logf("resp data:%+v", resp.Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestEditCard(t *testing.T) {
|
||||||
|
client, err := NewClient()
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
editCardRequest := EditCardRequestParam{
|
||||||
|
Uid: 32455414,
|
||||||
|
GameId: 5010,
|
||||||
|
Imei: "11111111",
|
||||||
|
IsReal: 0,
|
||||||
|
DirectStatus: 1,
|
||||||
|
AuthChannel: "gjfcm_wzcq",
|
||||||
|
DirectExtData: "测试测试测试",
|
||||||
|
Pi: "",
|
||||||
|
Ip: "",
|
||||||
|
Ipv6: "",
|
||||||
|
UserName: "asfasfd",
|
||||||
|
RealName: "这艘啊",
|
||||||
|
IdCard: "33032419950123532X",
|
||||||
|
Mandatory: "3123123123",
|
||||||
|
}
|
||||||
|
editCardResponse, err := client.EditCard(editCardRequest)
|
||||||
|
t.Logf("%v", editCardResponse)
|
||||||
|
|
||||||
|
}
|
||||||
|
97
services/passport/weedong.go
Normal file
97
services/passport/weedong.go
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
package passport
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||||
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
||||||
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/utils"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
const weeDongKey = "aVCxX2B3yswpxCMjaaSUHFXAzLYyuGhW"
|
||||||
|
|
||||||
|
func weeDongGetSign(ts int64) string {
|
||||||
|
return utils.Md5(utils.Md5(fmt.Sprintf("%d", ts)+weeDongKey) + weeDongKey)
|
||||||
|
}
|
||||||
|
|
||||||
|
type EditCardRequestParam struct {
|
||||||
|
Uid int64 `position:"Body" field:"uid"`
|
||||||
|
GameId int64 `position:"Body" field:"game_id"`
|
||||||
|
Imei string `position:"Body" field:"imei"`
|
||||||
|
IsReal int64 `position:"Body" field:"is_real"`
|
||||||
|
IsDirect int64 `position:"Body" field:"is_direct"`
|
||||||
|
DirectStatus int64 `position:"Body" field:"direct_status"`
|
||||||
|
AuthChannel string `position:"Body" field:"auth_channel"`
|
||||||
|
DirectExtData string `position:"Body" field:"direct_ext_data"`
|
||||||
|
Pi string `position:"Body" field:"pi"`
|
||||||
|
Ip string `position:"Body" field:"ip"`
|
||||||
|
Ipv6 string `position:"Body" field:"ipv6"`
|
||||||
|
UserName string `position:"Body" field:"user_name"`
|
||||||
|
RealName string `position:"Body" field:"truename"`
|
||||||
|
IdCard string `position:"Body" field:"idcard"`
|
||||||
|
Mandatory string `position:"Body" field:"mandatory"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type EditCardResponse struct {
|
||||||
|
*responses.BaseResponse
|
||||||
|
}
|
||||||
|
|
||||||
|
type EditCardRequest struct {
|
||||||
|
*requests.RpcRequest
|
||||||
|
Uid int64 `position:"Body" field:"uid"`
|
||||||
|
GameId int64 `position:"Body" field:"game_id"`
|
||||||
|
Imei string `position:"Body" field:"imei"`
|
||||||
|
IsReal int64 `position:"Body" field:"is_real"`
|
||||||
|
IsDirect int64 `position:"Body" field:"is_direct"`
|
||||||
|
DirectStatus int64 `position:"Body" field:"direct_status"`
|
||||||
|
AuthChannel string `position:"Body" field:"auth_channel"`
|
||||||
|
DirectExtData string `position:"Body" field:"direct_ext_data"`
|
||||||
|
Pi string `position:"Body" field:"pi"`
|
||||||
|
Ip string `position:"Body" field:"ip"`
|
||||||
|
Ipv6 string `position:"Body" field:"ipv6"`
|
||||||
|
UserName string `position:"Body" field:"user_name"`
|
||||||
|
RealName string `position:"Body" field:"truename"`
|
||||||
|
IdCard string `position:"Body" field:"idcard"`
|
||||||
|
Mandatory string `position:"Body" field:"mandatory"`
|
||||||
|
Action string `position:"Body" field:"action"`
|
||||||
|
Flag string `position:"Body" field:"flag"`
|
||||||
|
Time string `position:"Body" field:"time"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateEditCardRequest 记录实名结果接口
|
||||||
|
func CreateEditCardRequest(param EditCardRequestParam) (req *EditCardRequest) {
|
||||||
|
ts := time.Now().Unix()
|
||||||
|
sign := weeDongGetSign(ts)
|
||||||
|
|
||||||
|
req = &EditCardRequest{
|
||||||
|
RpcRequest: &requests.RpcRequest{},
|
||||||
|
Action: "edit_card",
|
||||||
|
Flag: sign,
|
||||||
|
Time: fmt.Sprintf("%v", ts),
|
||||||
|
IsDirect: param.IsDirect,
|
||||||
|
Uid: param.Uid,
|
||||||
|
GameId: param.GameId,
|
||||||
|
Imei: param.Imei,
|
||||||
|
IsReal: param.IsReal,
|
||||||
|
DirectStatus: param.DirectStatus,
|
||||||
|
AuthChannel: param.AuthChannel,
|
||||||
|
DirectExtData: param.DirectExtData,
|
||||||
|
Pi: param.Pi,
|
||||||
|
Ip: param.Ip,
|
||||||
|
Ipv6: param.Ipv6,
|
||||||
|
UserName: param.UserName,
|
||||||
|
RealName: param.RealName,
|
||||||
|
IdCard: param.IdCard,
|
||||||
|
Mandatory: param.Mandatory,
|
||||||
|
}
|
||||||
|
req.InitWithApiInfo(HOST, VERSION, "/weedong.php")
|
||||||
|
req.Method = requests.POST
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateEditCardResponse() (response *EditCardResponse) {
|
||||||
|
response = &EditCardResponse{
|
||||||
|
BaseResponse: &responses.BaseResponse{},
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user