Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ca0c051b4a | |||
| 8f1337ec27 | |||
| c53870b08a | |||
| 56ab109c90 | |||
| d06b43fea8 | |||
| a63ab8a8dc | |||
| 0fbd6d25b9 | |||
| dc2b1e92d3 | |||
| 9bb792c453 |
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
VERSION = "2024-06-03"
|
||||
VERSION = "2025-10-24"
|
||||
)
|
||||
|
||||
var HOST requests.Host = requests.Host{
|
||||
@ -62,3 +62,11 @@ func (c *Client) GetOrderState(req *GetOrderStateRequest) (response *GetOrderSta
|
||||
err = c.DoAction(req, response)
|
||||
return
|
||||
}
|
||||
|
||||
// GetVipInfo
|
||||
// 获取会员信息
|
||||
func (c *Client) GetVipInfo(req *GetVipInfoRequest) (response *GetVipInfoResponse, err error) {
|
||||
response = CreateGetVipInfoResponse()
|
||||
err = c.DoAction(req, response)
|
||||
return
|
||||
}
|
||||
|
||||
42
services/pay/get_vip_info.go
Normal file
42
services/pay/get_vip_info.go
Normal file
@ -0,0 +1,42 @@
|
||||
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
|
||||
}
|
||||
@ -74,3 +74,13 @@ func (c *Client) GetUserTotalPay(req *GetUserTotalPayReq) (resp *GetUserTotalPay
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// GetGameServerCountData 获取区服统计数据
|
||||
func (c *Client) GetGameServerCountData(req *GetGameServerCountDataReq) (resp *GetGameServerCountDataResp, err error) {
|
||||
resp = CreateGetGameServerCountDataResp()
|
||||
err = c.DoAction(req, resp)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -117,3 +117,22 @@ func TestGetUserTotalPay(t *testing.T) {
|
||||
}
|
||||
fmt.Println(resp.Code, resp.Msg, resp.Data)
|
||||
}
|
||||
|
||||
func TestGetGameServerCountData(t *testing.T) {
|
||||
client, err := NewClient()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
req := CreateGetGameServerCountData(GetGameServerCountDataParam{
|
||||
GameSign: "cs140",
|
||||
ServerSign: 8678,
|
||||
ServerId: 1944,
|
||||
RoleDates: "2025-10-15",
|
||||
})
|
||||
resp, err := client.GetGameServerCountData(req)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
fmt.Printf("%+v", resp.Data)
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package stat
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
||||
)
|
||||
@ -17,6 +18,32 @@ type SyncGameServerListResp struct {
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type GetGameServerCountDataReq struct {
|
||||
*requests.RpcRequest
|
||||
}
|
||||
|
||||
type GetGameServerCountDataResp struct {
|
||||
*responses.BaseResponse
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Data GetGameServerCountData `json:"data"`
|
||||
}
|
||||
|
||||
type GetGameServerCountData struct {
|
||||
GameSign string `json:"game_sign"`
|
||||
ServerId int64 `json:"server_id"`
|
||||
RoleNum int64 `json:"role_num"`
|
||||
TotalPayAmount float64 `json:"total_pay_amount"`
|
||||
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 创建同步开服数据请求
|
||||
// opt: 更新 insertOrUpdate, 删除 del
|
||||
//
|
||||
@ -60,3 +87,25 @@ func CreateSyncGameServerListResp() *SyncGameServerListResp {
|
||||
BaseResponse: &responses.BaseResponse{},
|
||||
}
|
||||
}
|
||||
|
||||
func CreateGetGameServerCountData(param GetGameServerCountDataParam) *GetGameServerCountDataReq {
|
||||
req := &GetGameServerCountDataReq{
|
||||
&requests.RpcRequest{},
|
||||
}
|
||||
|
||||
req.InitWithApiInfo(HOST, VERSION, "/game/getGameServerCountData")
|
||||
req.Method = requests.POST
|
||||
req.FormParams = make(map[string]string)
|
||||
req.FormParams["role_dates"] = param.RoleDates
|
||||
req.FormParams["server_id"] = fmt.Sprintf("%v", param.ServerId)
|
||||
req.FormParams["server_sign"] = fmt.Sprintf("%v", param.ServerSign)
|
||||
req.FormParams["game_sign"] = param.GameSign
|
||||
|
||||
return req
|
||||
}
|
||||
|
||||
func CreateGetGameServerCountDataResp() *GetGameServerCountDataResp {
|
||||
return &GetGameServerCountDataResp{
|
||||
BaseResponse: &responses.BaseResponse{},
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
VERSION = "2025-10-10"
|
||||
VERSION = "2025-10-24"
|
||||
)
|
||||
|
||||
var HOST = requests.Host{
|
||||
@ -32,3 +32,13 @@ func (c *Client) GetVipQrCode(req *GetVipQrCodeReq) (resp *GetVipQrCodeResp, err
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// IsUserBind 判断账号是否绑定跟进人
|
||||
func (c *Client) IsUserBind(req *IsUserBindReq) (resp *IsUserBindResp, err error) {
|
||||
resp = CreateIsUserBindResp()
|
||||
err = c.DoAction(req, resp)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -43,3 +43,40 @@ func CreateGetVipQrCodeResp() *GetVipQrCodeResp {
|
||||
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{},
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user