Compare commits
No commits in common. "c81fa6be2c7c8fb99f93a070689680327835b738" and "c753415404c033bb5aae71ebaff558c55459fa92" have entirely different histories.
c81fa6be2c
...
c753415404
@ -116,6 +116,5 @@ func Unmarshal(response AcsResponse, httpResponse *http.Response, format string)
|
|||||||
return errors.New("json Unmarshal:" + err.Error())
|
return errors.New("json Unmarshal:" + err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -154,9 +154,3 @@ func (client *Client) ClearHotFaqCache(req *ClearHotFaqCacheRequest) (resp *Clea
|
|||||||
err = client.DoAction(req, resp)
|
err = client.DoAction(req, resp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (client *Client) GetLinkGameConfig(req *GetLinkGameConfigRequest) (resp *GetLinkGameConfigResponse, err error) {
|
|
||||||
resp = CreateGetLinkGameConfigResponse()
|
|
||||||
err = client.DoAction(req, resp)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
@ -456,23 +456,3 @@ func TestClearHotFaqCache(t *testing.T) {
|
|||||||
}
|
}
|
||||||
fmt.Printf(fmt.Sprintf("%v", res))
|
fmt.Printf(fmt.Sprintf("%v", res))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取人工客服链接,主体与游戏参数配置详情
|
|
||||||
func TestGetLinkGameConfigDetail(t *testing.T) {
|
|
||||||
client, newErr := NewClient()
|
|
||||||
if newErr != nil {
|
|
||||||
panic(newErr)
|
|
||||||
}
|
|
||||||
req := CreateGetLinkGameConfigRequest(LinkGameConfigRequest{
|
|
||||||
Company: "JJW",
|
|
||||||
})
|
|
||||||
res, err := client.GetLinkGameConfig(req)
|
|
||||||
if err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if res.Code != 0 || res.Data.SubjectSign == "" {
|
|
||||||
t.Error("获取人工客服链接,主体与游戏参数配置详情失败")
|
|
||||||
}
|
|
||||||
fmt.Printf(fmt.Sprintf("%v", res.Data))
|
|
||||||
}
|
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
package cs
|
|
||||||
|
|
||||||
import (
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
|
||||||
)
|
|
||||||
|
|
||||||
// 中旭人工客服链接,主体与游戏配置
|
|
||||||
|
|
||||||
type LinkGameConfig struct {
|
|
||||||
SubjectSign string `json:"subject_sign"`
|
|
||||||
SubjectName string `json:"subject_name"`
|
|
||||||
LinkGameId int64 `json:"link_game_id"`
|
|
||||||
CreatedAt string `json:"created_at"`
|
|
||||||
}
|
|
||||||
type GetLinkGameConfigRequest struct {
|
|
||||||
*requests.JsonRequest
|
|
||||||
Company string `position:"Json" field:"company"`
|
|
||||||
}
|
|
||||||
type GetLinkGameConfigResponse struct {
|
|
||||||
*responses.BaseResponse
|
|
||||||
Code int `json:"code"`
|
|
||||||
Msg string `json:"msg"`
|
|
||||||
Data *LinkGameConfig `json:"data"`
|
|
||||||
}
|
|
||||||
type LinkGameConfigRequest struct {
|
|
||||||
Company string `json:"company"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateGetLinkGameConfigRequest(param LinkGameConfigRequest) (req *GetLinkGameConfigRequest) {
|
|
||||||
req = &GetLinkGameConfigRequest{
|
|
||||||
JsonRequest: &requests.JsonRequest{},
|
|
||||||
Company: param.Company,
|
|
||||||
}
|
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/v1/config/get_link_game_config")
|
|
||||||
|
|
||||||
req.Method = requests.POST
|
|
||||||
return
|
|
||||||
}
|
|
||||||
func CreateGetLinkGameConfigResponse() (response *GetLinkGameConfigResponse) {
|
|
||||||
response = &GetLinkGameConfigResponse{
|
|
||||||
BaseResponse: &responses.BaseResponse{},
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
@ -93,8 +93,6 @@ func CreateGetFaqDetailResponse() (response *GetFaqDetailResponse) {
|
|||||||
type HotFaq struct {
|
type HotFaq struct {
|
||||||
Id int64 `json:"id"`
|
Id int64 `json:"id"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
ParentId int64 `json:"parent_id"`
|
|
||||||
ParentTitle string `json:"parent_title"`
|
|
||||||
}
|
}
|
||||||
type GetHotFaqRequest struct {
|
type GetHotFaqRequest struct {
|
||||||
*requests.JsonRequest
|
*requests.JsonRequest
|
||||||
|
@ -63,11 +63,3 @@ func (c *Client) GetUserGameSign(req *GetUserGameSignRequest) (response *GetUser
|
|||||||
err = c.DoAction(req, response)
|
err = c.DoAction(req, response)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChangePassword
|
|
||||||
// 用户修改密码
|
|
||||||
func (c *Client) ChangePassword(req *ChangePasswordRequest) (response *ChangePasswordResponse, err error) {
|
|
||||||
response = CreateChangePasswordResponse()
|
|
||||||
err = c.DoAction(req, response)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
@ -78,19 +78,3 @@ func TestGetUserGameSign(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 TestChangePassword(t *testing.T) {
|
|
||||||
client, err := NewClient()
|
|
||||||
if err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
req := CreateChangePasswordRequest("rz35990497", "7654321")
|
|
||||||
|
|
||||||
resp, err := client.ChangePassword(req)
|
|
||||||
if err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
// 记录文本结果
|
|
||||||
t.Logf("resp code:%+v, msg:%s", resp.Code, resp.Msg)
|
|
||||||
}
|
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
package passport
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
||||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
|
||||||
)
|
|
||||||
|
|
||||||
type ChangePasswordRequest struct {
|
|
||||||
*requests.RpcRequest
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateChangePasswordRequest(userName string, newPwd string) (req *ChangePasswordRequest) {
|
|
||||||
ts, sign := GetSign()
|
|
||||||
|
|
||||||
req = &ChangePasswordRequest{
|
|
||||||
RpcRequest: &requests.RpcRequest{},
|
|
||||||
}
|
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/remote_login.php")
|
|
||||||
req.FormParams = map[string]string{
|
|
||||||
"act": "getpwd",
|
|
||||||
"do": "passwd",
|
|
||||||
"username": userName,
|
|
||||||
"newpwd": newPwd,
|
|
||||||
"time": fmt.Sprintf("%v", ts),
|
|
||||||
"sign": sign,
|
|
||||||
"format": "json",
|
|
||||||
}
|
|
||||||
|
|
||||||
req.Method = requests.POST
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func CreateChangePasswordResponse() (response *ChangePasswordResponse) {
|
|
||||||
response = &ChangePasswordResponse{
|
|
||||||
BaseResponse: &responses.BaseResponse{},
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
type ChangePasswordResponse struct {
|
|
||||||
*responses.BaseResponse
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user