7
0

Compare commits

..

No commits in common. "master" and "v1.2.28" have entirely different histories.

6 changed files with 13 additions and 122 deletions

View File

@ -6,7 +6,7 @@ import (
) )
const ( const (
VERSION = "2025-10-24" VERSION = "2024-06-03"
) )
var HOST requests.Host = requests.Host{ var HOST requests.Host = requests.Host{
@ -62,11 +62,3 @@ func (c *Client) GetOrderState(req *GetOrderStateRequest) (response *GetOrderSta
err = c.DoAction(req, response) err = c.DoAction(req, response)
return return
} }
// GetVipInfo
// 获取会员信息
func (c *Client) GetVipInfo(req *GetVipInfoRequest) (response *GetVipInfoResponse, err error) {
response = CreateGetVipInfoResponse()
err = c.DoAction(req, response)
return
}

View File

@ -1,42 +0,0 @@
package pay
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
type GetVipInfoRequest struct {
*requests.RpcRequest
UserName string `position:"Body" field:"user_name" default:"" `
}
type GetVipInfoResponse struct {
*responses.BaseResponse
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
UserName string `json:"user_name"` // 用户名
Score float64 `json:"score"`
Level int `json:"level"`
AttainDate string `json:"attain_date"`
ExpiryDate string `json:"expiry_date"`
IsWindows int `json:"is_windows"`
} `json:"data"`
}
func CreateGetVipInfoRequest(userName string) (req *GetVipInfoRequest) {
req = &GetVipInfoRequest{
RpcRequest: &requests.RpcRequest{},
UserName: userName,
}
req.InitWithApiInfo(HOST, VERSION, "/api/user/getVipInfo")
req.Method = requests.POST
return
}
func CreateGetVipInfoResponse() (response *GetVipInfoResponse) {
response = &GetVipInfoResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@ -123,16 +123,14 @@ func TestGetGameServerCountData(t *testing.T) {
if err != nil { if err != nil {
panic(err) panic(err)
} }
req := CreateGetGameServerCountData(GetGameServerCountDataParam{ req := CreateGetGameServerCountData(
GameSign: "cs140", "2024-07-30,2024-07-23",
ServerSign: 8678, "1111,1234",
ServerId: 1944, )
RoleDates: "2025-10-15",
})
resp, err := client.GetGameServerCountData(req) resp, err := client.GetGameServerCountData(req)
if err != nil { if err != nil {
panic(err) panic(err)
} }
fmt.Printf("%+v", resp.Data) fmt.Println(resp.Code, resp.Msg, resp.Data)
} }

View File

@ -2,7 +2,6 @@ package stat
import ( import (
"encoding/json" "encoding/json"
"fmt"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" "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/responses"
) )
@ -24,9 +23,9 @@ type GetGameServerCountDataReq struct {
type GetGameServerCountDataResp struct { type GetGameServerCountDataResp struct {
*responses.BaseResponse *responses.BaseResponse
Code int `json:"code"` Code int `json:"code"`
Msg string `json:"msg"` Msg string `json:"msg"`
Data GetGameServerCountData `json:"data"` Data []GetGameServerCountData `json:"data"`
} }
type GetGameServerCountData struct { type GetGameServerCountData struct {
@ -37,13 +36,6 @@ type GetGameServerCountData struct {
TotalPayRoleNum int64 `json:"total_pay_role_num"` TotalPayRoleNum int64 `json:"total_pay_role_num"`
} }
type GetGameServerCountDataParam struct {
GameSign string `json:"game_sign"`
ServerSign int64 `json:"server_sign"`
ServerId int64 `json:"server_id"`
RoleDates string `json:"role_dates"`
}
// CreateSyncGameServerListReq 创建同步开服数据请求 // CreateSyncGameServerListReq 创建同步开服数据请求
// opt: 更新 insertOrUpdate, 删除 del // opt: 更新 insertOrUpdate, 删除 del
// //
@ -88,7 +80,7 @@ func CreateSyncGameServerListResp() *SyncGameServerListResp {
} }
} }
func CreateGetGameServerCountData(param GetGameServerCountDataParam) *GetGameServerCountDataReq { func CreateGetGameServerCountData(roleDates string, serverIds string) *GetGameServerCountDataReq {
req := &GetGameServerCountDataReq{ req := &GetGameServerCountDataReq{
&requests.RpcRequest{}, &requests.RpcRequest{},
} }
@ -96,10 +88,8 @@ func CreateGetGameServerCountData(param GetGameServerCountDataParam) *GetGameSer
req.InitWithApiInfo(HOST, VERSION, "/game/getGameServerCountData") req.InitWithApiInfo(HOST, VERSION, "/game/getGameServerCountData")
req.Method = requests.POST req.Method = requests.POST
req.FormParams = make(map[string]string) req.FormParams = make(map[string]string)
req.FormParams["role_dates"] = param.RoleDates req.FormParams["role_dates"] = roleDates
req.FormParams["server_id"] = fmt.Sprintf("%v", param.ServerId) req.FormParams["server_ids"] = serverIds
req.FormParams["server_sign"] = fmt.Sprintf("%v", param.ServerSign)
req.FormParams["game_sign"] = param.GameSign
return req return req
} }

View File

@ -6,7 +6,7 @@ import (
) )
const ( const (
VERSION = "2025-10-24" VERSION = "2025-10-10"
) )
var HOST = requests.Host{ var HOST = requests.Host{
@ -32,13 +32,3 @@ func (c *Client) GetVipQrCode(req *GetVipQrCodeReq) (resp *GetVipQrCodeResp, err
} }
return return
} }
// IsUserBind 判断账号是否绑定跟进人
func (c *Client) IsUserBind(req *IsUserBindReq) (resp *IsUserBindResp, err error) {
resp = CreateIsUserBindResp()
err = c.DoAction(req, resp)
if err != nil {
return
}
return
}

View File

@ -43,40 +43,3 @@ func CreateGetVipQrCodeResp() *GetVipQrCodeResp {
BaseResponse: &responses.BaseResponse{}, BaseResponse: &responses.BaseResponse{},
} }
} }
type IsUserBindReq struct {
*requests.RpcRequest
}
type IsUserBindResp struct {
*responses.BaseResponse
Code int `json:"status_code"`
Msg string `json:"status_msg"`
Data IsUserBind `json:"data"`
}
type IsUserBind struct {
IsBind bool `json:"is_bind"`
}
// CreateIsUserBindReq 获取判断用户是否绑定微信请求
func CreateIsUserBindReq(data map[string]string) *IsUserBindReq {
req := &IsUserBindReq{
&requests.RpcRequest{},
}
req.InitWithApiInfo(HOST, VERSION, "/v1/vip/is_user_bind")
req.Method = requests.POST
req.FormParams = data
if req.FormParams == nil {
req.FormParams = make(map[string]string)
}
return req
}
// CreateIsUserBindResp 判断用户是否绑定微信请求
func CreateIsUserBindResp() *IsUserBindResp {
return &IsUserBindResp{
BaseResponse: &responses.BaseResponse{},
}
}