Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
9aa5924b97 | |||
|
66ee953f5f | ||
|
4b13de26bd | ||
|
e6d4532874 | ||
|
e30ecac33b | ||
|
b06b846be7 | ||
|
699a113863 | ||
|
22551147eb | ||
|
13bf104d52 | ||
|
083c5a7ba1 |
@ -11,7 +11,7 @@ const (
|
||||
)
|
||||
|
||||
var HOST = requests.Host{
|
||||
Default: "cs",
|
||||
Default: "cs.api.gaore.com",
|
||||
}
|
||||
|
||||
type Client struct {
|
||||
@ -132,3 +132,21 @@ func (client *Client) GetHotFaqList(req *GetHotFaqRequest) (resp *GetHotFaqRespo
|
||||
err = client.DoAction(req, resp)
|
||||
return
|
||||
}
|
||||
|
||||
func (client *Client) ClearFaqListCache(req *ClearFaqListCacheRequest) (resp *ClearFaqListCacheResponse, err error) {
|
||||
resp = CreateClearFaqListCacheResponse()
|
||||
err = client.DoAction(req, resp)
|
||||
return
|
||||
}
|
||||
|
||||
func (client *Client) ClearFaqDetailCache(req *ClearFaqDetailCacheRequest) (resp *ClearFaqDetailCacheResponse, err error) {
|
||||
resp = CreateClearFaqDetailCacheResponse()
|
||||
err = client.DoAction(req, resp)
|
||||
return
|
||||
}
|
||||
|
||||
func (client *Client) ClearHotFaqCache(req *ClearHotFaqCacheRequest) (resp *ClearHotFaqCacheResponse, err error) {
|
||||
resp = CreateClearHotFaqCacheResponse()
|
||||
err = client.DoAction(req, resp)
|
||||
return
|
||||
}
|
||||
|
@ -404,3 +404,56 @@ func TestGetFaqHotList(t *testing.T) {
|
||||
}
|
||||
fmt.Printf(fmt.Sprintf("%v", res))
|
||||
}
|
||||
|
||||
// 清理faq列表缓存
|
||||
func TestClearFaqListCache(t *testing.T) {
|
||||
client, newErr := NewClient()
|
||||
if newErr != nil {
|
||||
panic(newErr)
|
||||
}
|
||||
req := CreateClearFaqListCacheRequest()
|
||||
res, err := client.ClearFaqListCache(req)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if res.Code != 0 {
|
||||
t.Error("清理faq列表缓存失败")
|
||||
}
|
||||
fmt.Printf(fmt.Sprintf("%v", res))
|
||||
}
|
||||
|
||||
// 清理faq详情缓存
|
||||
func TestClearFaqDetailCache(t *testing.T) {
|
||||
client, newErr := NewClient()
|
||||
if newErr != nil {
|
||||
panic(newErr)
|
||||
}
|
||||
req := CreateClearFaqDetailCacheRequest(FaqDetailRequest{
|
||||
Id: int64(30),
|
||||
})
|
||||
res, err := client.ClearFaqDetailCache(req)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if res.Code != 0 {
|
||||
t.Error("清理faq详情缓存失败")
|
||||
}
|
||||
fmt.Printf(fmt.Sprintf("%v", res))
|
||||
}
|
||||
|
||||
// 清理热门faq缓存
|
||||
func TestClearHotFaqCache(t *testing.T) {
|
||||
client, newErr := NewClient()
|
||||
if newErr != nil {
|
||||
panic(newErr)
|
||||
}
|
||||
req := CreateClearHotFaqCacheRequest()
|
||||
res, err := client.ClearHotFaqCache(req)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if res.Code != 0 {
|
||||
t.Error("清理热门faq缓存失败")
|
||||
}
|
||||
fmt.Printf(fmt.Sprintf("%v", res))
|
||||
}
|
||||
|
@ -49,13 +49,14 @@ func CreateGetFaqResponse() (response *GetFaqResponse) {
|
||||
|
||||
// FaqDetail Faq详情
|
||||
type FaqDetail struct {
|
||||
Id int64 `json:"id"`
|
||||
ParentId int64 `json:"parent_id"`
|
||||
Title string `json:"title"`
|
||||
Answer string `json:"answer"`
|
||||
Type int64 `json:"type"`
|
||||
WorkOrderTemplateId int64 `json:"work_order_template_id"`
|
||||
ProcessFlow string `json:"process_flow"`
|
||||
Id int64 `json:"id"`
|
||||
ParentId int64 `json:"parent_id"`
|
||||
Title string `json:"title"`
|
||||
Answer string `json:"answer"`
|
||||
Type int64 `json:"type"`
|
||||
WorkOrderTemplateId int64 `json:"work_order_template_id"`
|
||||
ProcessFlow string `json:"process_flow"`
|
||||
WorkOrderTemplateCode string `json:"work_order_template_code"`
|
||||
}
|
||||
type GetFaqDetailRequest struct {
|
||||
*requests.JsonRequest
|
||||
@ -118,3 +119,83 @@ func CreateGetHotFaqResponse() (response *GetHotFaqResponse) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 清理faq树缓存
|
||||
type ClearFaqListCacheRequest struct {
|
||||
*requests.JsonRequest
|
||||
}
|
||||
type ClearFaqListCacheResponse struct {
|
||||
*responses.BaseResponse
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
}
|
||||
|
||||
func CreateClearFaqListCacheRequest() (req *ClearFaqListCacheRequest) {
|
||||
req = &ClearFaqListCacheRequest{
|
||||
JsonRequest: &requests.JsonRequest{},
|
||||
}
|
||||
req.InitWithApiInfo(HOST, VERSION, "/v1/faq/clear_list_cache")
|
||||
|
||||
req.Method = requests.POST
|
||||
return
|
||||
}
|
||||
func CreateClearFaqListCacheResponse() (response *ClearFaqListCacheResponse) {
|
||||
response = &ClearFaqListCacheResponse{
|
||||
BaseResponse: &responses.BaseResponse{},
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 清理faq详情缓存
|
||||
type ClearFaqDetailCacheRequest struct {
|
||||
*requests.JsonRequest
|
||||
Id int64 `position:"Json" field:"id"`
|
||||
}
|
||||
type ClearFaqDetailCacheResponse struct {
|
||||
*responses.BaseResponse
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
}
|
||||
|
||||
func CreateClearFaqDetailCacheRequest(param FaqDetailRequest) (req *ClearFaqDetailCacheRequest) {
|
||||
req = &ClearFaqDetailCacheRequest{
|
||||
JsonRequest: &requests.JsonRequest{},
|
||||
Id: param.Id,
|
||||
}
|
||||
req.InitWithApiInfo(HOST, VERSION, "/v1/faq/clear_detail_cache")
|
||||
|
||||
req.Method = requests.POST
|
||||
return
|
||||
}
|
||||
func CreateClearFaqDetailCacheResponse() (response *ClearFaqDetailCacheResponse) {
|
||||
response = &ClearFaqDetailCacheResponse{
|
||||
BaseResponse: &responses.BaseResponse{},
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 清理热门faq缓存
|
||||
type ClearHotFaqCacheRequest struct {
|
||||
*requests.JsonRequest
|
||||
}
|
||||
type ClearHotFaqCacheResponse struct {
|
||||
*responses.BaseResponse
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
}
|
||||
|
||||
func CreateClearHotFaqCacheRequest() (req *ClearHotFaqCacheRequest) {
|
||||
req = &ClearHotFaqCacheRequest{
|
||||
JsonRequest: &requests.JsonRequest{},
|
||||
}
|
||||
req.InitWithApiInfo(HOST, VERSION, "/v1/faq/clear_hot_list_cache")
|
||||
|
||||
req.Method = requests.POST
|
||||
return
|
||||
}
|
||||
func CreateClearHotFaqCacheResponse() (response *ClearHotFaqCacheResponse) {
|
||||
response = &ClearHotFaqCacheResponse{
|
||||
BaseResponse: &responses.BaseResponse{},
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -34,6 +34,11 @@ type OrderRecord struct {
|
||||
OrderParts []*OrderSubmitPart `json:"order_parts"`
|
||||
Id int64 `json:"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 分页响应
|
||||
|
@ -26,11 +26,11 @@ func TestGetGameInfo(t *testing.T) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
resp, err := client.GetGameInfo(CreateGetGameInfoByIdReq(8362, 1))
|
||||
resp, err := client.GetGameInfo(CreateGetGameInfoByIdReq(797, 1))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Println(resp.Code, resp.Msg, resp.Data)
|
||||
fmt.Println(resp.Code, resp.Msg, resp.Data.GameHomeShortImage)
|
||||
}
|
||||
|
||||
func TestChannelInfo(t *testing.T) {
|
||||
@ -179,3 +179,18 @@ func TestGetGameRealAuthInfo(t *testing.T) {
|
||||
}
|
||||
t.Log(isBlockOutIos)
|
||||
}
|
||||
|
||||
func TestGetGameVersion(t *testing.T) {
|
||||
client, err := NewClient()
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
req := CreateGetGameVersionReq(8071, "1.0.6")
|
||||
resp, err := client.GetGameVersion(req)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
t.Log(resp)
|
||||
}
|
||||
|
@ -103,6 +103,9 @@ type GameInfoData struct {
|
||||
FlashPassKey string `json:"flash_pass_key"`
|
||||
GameByname string `json:"game_byname"`
|
||||
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"`
|
||||
GameTsUrl string `json:"game_ts_url"`
|
||||
GameVersion string `json:"game_version"`
|
||||
@ -261,29 +264,32 @@ func CreateGetGameCompanyResp() *GetGameCompanyResp {
|
||||
// ==== 获取游戏客户端版本配置
|
||||
|
||||
type GameVersion struct {
|
||||
ID int `json:"id"`
|
||||
GameID int `json:"game_id"`
|
||||
GameVersion string `json:"version"`
|
||||
GameURL string `json:"url"`
|
||||
PayCallbackURL string `json:"pay_callback_url"`
|
||||
DomainURL string `json:"domain_url"`
|
||||
Status int `json:"status"`
|
||||
H5Version int `json:"h5_version"`
|
||||
H5Status int `json:"h5_status"`
|
||||
IsH5Logout int `json:"is_h5_logout"`
|
||||
HideWindow int `json:"hidewindow"`
|
||||
PayInfo PayInfo `json:"pay_display_info"`
|
||||
IsYsdk int `json:"is_ysdk"`
|
||||
CheckVerified int `json:"check_verified"`
|
||||
Company string `json:"company"`
|
||||
CompanyKf string `json:"company_kf"`
|
||||
CompanyProto string `json:"company_proto"`
|
||||
CompanySms string `json:"company_sms"`
|
||||
KfStatus int `json:"kf_status"`
|
||||
PopupTime int `json:"popup_time"`
|
||||
ExtData map[string]any `json:"ext_data"`
|
||||
VersionStatus int `json:"version_status"`
|
||||
VersionTime int `json:"version_time"`
|
||||
ID int `json:"id"`
|
||||
GameID int `json:"game_id"`
|
||||
GameVersion string `json:"version"`
|
||||
GameURL string `json:"url"`
|
||||
PayCallbackURL string `json:"pay_callback_url"`
|
||||
DomainURL string `json:"domain_url"`
|
||||
Status int `json:"status"`
|
||||
H5Version int `json:"h5_version"`
|
||||
H5Status int `json:"h5_status"`
|
||||
IsH5Logout int `json:"is_h5_logout"`
|
||||
HideWindow int `json:"hidewindow"`
|
||||
PayInfo PayInfo `json:"pay_display_info"`
|
||||
IsYsdk int `json:"is_ysdk"`
|
||||
CheckVerified int `json:"check_verified"`
|
||||
Company string `json:"company"`
|
||||
CompanyKf string `json:"company_kf"`
|
||||
CompanyProto string `json:"company_proto"`
|
||||
CompanySms string `json:"company_sms"`
|
||||
KfStatus int `json:"kf_status"`
|
||||
PopupTime int `json:"popup_time"`
|
||||
ExtData map[string]any `json:"ext_data"`
|
||||
VersionStatus int `json:"version_status"`
|
||||
VersionTime int `json:"version_time"`
|
||||
RequestDomain string `json:"request_domain"`
|
||||
SpareRequestDomain string `json:"spare_request_domain"`
|
||||
OtherRequestDomain string `json:"other_request_domain"`
|
||||
}
|
||||
|
||||
type GetGameVersionReq struct {
|
||||
|
@ -19,6 +19,7 @@ type EditCardRequestParam struct {
|
||||
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"`
|
||||
@ -41,6 +42,7 @@ type EditCardRequest struct {
|
||||
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"`
|
||||
@ -54,7 +56,6 @@ type EditCardRequest struct {
|
||||
Action string `position:"Body" field:"action"`
|
||||
Flag string `position:"Body" field:"flag"`
|
||||
Time string `position:"Body" field:"time"`
|
||||
IsDirect int64 `position:"Body" field:"is_direct"`
|
||||
}
|
||||
|
||||
// CreateEditCardRequest 记录实名结果接口
|
||||
@ -63,12 +64,11 @@ func CreateEditCardRequest(param EditCardRequestParam) (req *EditCardRequest) {
|
||||
sign := weeDongGetSign(ts)
|
||||
|
||||
req = &EditCardRequest{
|
||||
RpcRequest: &requests.RpcRequest{},
|
||||
Action: "edit_card",
|
||||
Flag: sign,
|
||||
Time: fmt.Sprintf("%v", ts),
|
||||
IsDirect: 0,
|
||||
//
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user