新增获取iOS切支付规则接口
This commit is contained in:
		
							parent
							
								
									7e664f3f29
								
							
						
					
					
						commit
						b69ed4b807
					
				@ -75,3 +75,10 @@ func (c *Client) GetGameCompany(req *GetGameCompanyReq) (resp *GetGameCompanyRes
 | 
				
			|||||||
	err = c.DoAction(req, resp)
 | 
						err = c.DoAction(req, resp)
 | 
				
			||||||
	return
 | 
						return
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// GetIsBlockOutIos 获取iOS切支付规则
 | 
				
			||||||
 | 
					func (c *Client) GetIsBlockOutIos(req *IsBlockOutIosReq) (resp *IsBlockOutIosResp, err error) {
 | 
				
			||||||
 | 
						resp = CreateIsBlockOutIosResp()
 | 
				
			||||||
 | 
						err = c.DoAction(req, resp)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -120,3 +120,17 @@ func TestGetGameCompany(t *testing.T) {
 | 
				
			|||||||
	fmt.Println(gameCompany)
 | 
						fmt.Println(gameCompany)
 | 
				
			||||||
	fmt.Println(gameCompany.Data.System)
 | 
						fmt.Println(gameCompany.Data.System)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func TestIsBlockOutIos(t *testing.T) {
 | 
				
			||||||
 | 
						client, err := NewClient()
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							t.Error(err)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						isBlockOutIosReq := CreateIsBlockOutIosReq("ec63860282", 4570, "116.26.129.38", "", 0, 0)
 | 
				
			||||||
 | 
						isBlockOutIos, err := client.GetIsBlockOutIos(isBlockOutIosReq)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							t.Error(err)
 | 
				
			||||||
 | 
							return
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						t.Log(isBlockOutIos)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										60
									
								
								services/game/pay.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								services/game/pay.go
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,60 @@
 | 
				
			|||||||
 | 
					package game
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
 | 
				
			||||||
 | 
						"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// IsBlockOutIosReq
 | 
				
			||||||
 | 
					// 获取切支付规则
 | 
				
			||||||
 | 
					type IsBlockOutIosReq struct {
 | 
				
			||||||
 | 
						*requests.RpcRequest
 | 
				
			||||||
 | 
						UserName  string `position:"Body" field:"user_name"`
 | 
				
			||||||
 | 
						GameId    int64  `position:"Body" field:"appid"`
 | 
				
			||||||
 | 
						Ip        string `position:"Body" field:"ip"`
 | 
				
			||||||
 | 
						Imei      string `position:"Body" field:"imei"`
 | 
				
			||||||
 | 
						LoginDays int64  `position:"Body" field:"login_days"`
 | 
				
			||||||
 | 
						PlayTime  int64  `position:"Body" field:"play_time"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type IsBlockOutIosRespData struct {
 | 
				
			||||||
 | 
						PayInChannel                bool    `json:"pay_in_channel"`
 | 
				
			||||||
 | 
						PayInChannelMatchedRule     []int64 `json:"pay_in_channel_matched_rule"`
 | 
				
			||||||
 | 
						DoDisplayIos                bool    `json:"do_display_ios"`
 | 
				
			||||||
 | 
						DoDisplayIosMatchedRule     []int64 `json:"do_display_ios_matched_rule"`
 | 
				
			||||||
 | 
						DoDisplayWebsite            bool    `json:"do_display_website"`
 | 
				
			||||||
 | 
						DoDisplayWebsiteMatchedRule []int64 `json:"do_display_website_matched_rule"`
 | 
				
			||||||
 | 
						DoDisplayWebsiteWechatInfo  string  `json:"do_display_website_wechat_info"`
 | 
				
			||||||
 | 
						DoWebOrderPay               bool    `json:"do_web_order_pay"`
 | 
				
			||||||
 | 
						DoWebOrderPayMatchedRule    []int64 `json:"do_web_order_pay_matched_rule"`
 | 
				
			||||||
 | 
						DoWebOrderPayWechatInfo     string  `json:"do_web_order_pay_wechat_info"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type IsBlockOutIosResp struct {
 | 
				
			||||||
 | 
						*responses.BaseResponse
 | 
				
			||||||
 | 
						Code int                   `json:"code"`
 | 
				
			||||||
 | 
						Msg  string                `json:"msg"`
 | 
				
			||||||
 | 
						Data IsBlockOutIosRespData `json:"data"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func CreateIsBlockOutIosReq(userName string, gameId int64, ip string, imei string, loginDays, playTime int64) *IsBlockOutIosReq {
 | 
				
			||||||
 | 
						req := &IsBlockOutIosReq{
 | 
				
			||||||
 | 
							RpcRequest: &requests.RpcRequest{},
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						req.UserName = userName
 | 
				
			||||||
 | 
						req.GameId = gameId
 | 
				
			||||||
 | 
						req.Ip = ip
 | 
				
			||||||
 | 
						req.Imei = imei
 | 
				
			||||||
 | 
						req.LoginDays = loginDays
 | 
				
			||||||
 | 
						req.PlayTime = playTime
 | 
				
			||||||
 | 
						req.InitWithApiInfo(HOST, VERSION, "/api/pay/isBlockOutIos")
 | 
				
			||||||
 | 
						req.Method = requests.POST
 | 
				
			||||||
 | 
						return req
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func CreateIsBlockOutIosResp() *IsBlockOutIosResp {
 | 
				
			||||||
 | 
						resp := &IsBlockOutIosResp{
 | 
				
			||||||
 | 
							BaseResponse: &responses.BaseResponse{},
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return resp
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user