- 修改AccessPlatformAPIWithRetry接口,允许处理返回结果为非JSON请求
This commit is contained in:
@@ -137,7 +137,10 @@ func (a *API) AccessAPI(apiStr string, params map[string]interface{}) (retVal Re
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
status := jsonResult1["status"].(string)
|
status := jsonResult1["status"].(string)
|
||||||
if status == StatusCodeSuccess {
|
if status == StatusCodeSuccess {
|
||||||
retVal = jsonResult1
|
retVal = jsonResult1
|
||||||
|
|||||||
@@ -118,7 +118,10 @@ func (a *API) AccessAPI(action string, params interface{}) (retVal *ResponseResu
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (result string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
code := int(utils.MustInterface2Int64(jsonResult1["code"]))
|
code := int(utils.MustInterface2Int64(jsonResult1["code"]))
|
||||||
retVal = &ResponseResult{
|
retVal = &ResponseResult{
|
||||||
Code: code,
|
Code: code,
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
"crypto/hmac"
|
"crypto/hmac"
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -147,7 +148,10 @@ func (a *API) AccessAPI(action string, params map[string]interface{}, bodyMap ma
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (result string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
errCode := int(utils.MustInterface2Int64(jsonResult1["errcode"]))
|
errCode := int(utils.MustInterface2Int64(jsonResult1["errcode"]))
|
||||||
if errCode == ResponseCodeSuccess {
|
if errCode == ResponseCodeSuccess {
|
||||||
retVal = jsonResult1
|
retVal = jsonResult1
|
||||||
|
|||||||
@@ -115,7 +115,10 @@ func (a *API) AccessAPI(cmd string, body map[string]interface{}) (retVal *Respon
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (result string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
Body := jsonResult1["body"].(map[string]interface{})
|
Body := jsonResult1["body"].(map[string]interface{})
|
||||||
retVal = &ResponseResult{
|
retVal = &ResponseResult{
|
||||||
ErrNo: int(utils.MustInterface2Int64(Body["errno"])),
|
ErrNo: int(utils.MustInterface2Int64(Body["errno"])),
|
||||||
|
|||||||
@@ -344,7 +344,10 @@ func (a *API) AccessStorePage2(subURL string, params map[string]interface{}, isP
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
retVal = jsonResult1
|
retVal = jsonResult1
|
||||||
code := int(utils.MustInterface2Int64(jsonResult1["errno"]))
|
code := int(utils.MustInterface2Int64(jsonResult1["errno"]))
|
||||||
if code == ResponseCodeSuccess {
|
if code == ResponseCodeSuccess {
|
||||||
@@ -591,7 +594,10 @@ func (a *API) AccessStorePageNoCookie(subURL string, params map[string]interface
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
code := int(utils.MustInterface2Int64(jsonResult1["error_no"]))
|
code := int(utils.MustInterface2Int64(jsonResult1["error_no"]))
|
||||||
if code == ResponseCodeSuccess {
|
if code == ResponseCodeSuccess {
|
||||||
retVal = jsonResult1["result"].(map[string]interface{})
|
retVal = jsonResult1["result"].(map[string]interface{})
|
||||||
|
|||||||
@@ -159,7 +159,10 @@ func (a *API) AccessAPI(action string, params map[string]interface{}) (retVal *R
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (result string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
resultError, _ := jsonResult1["error"].(map[string]interface{})
|
resultError, _ := jsonResult1["error"].(map[string]interface{})
|
||||||
retVal = &ResponseResult{
|
retVal = &ResponseResult{
|
||||||
ID: jsonResult1["id"].(string),
|
ID: jsonResult1["id"].(string),
|
||||||
@@ -216,7 +219,10 @@ func (a *API) AcccessAPI2(baseURL string, params map[string]interface{}, method
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (result string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
retVal = jsonResult1
|
retVal = jsonResult1
|
||||||
return platformapi.ErrLevelSuccess, nil
|
return platformapi.ErrLevelSuccess, nil
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -121,7 +121,10 @@ func (a *API) AccessAPI(apiName string, apiParams map[string]interface{}) (retVa
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
code := int(utils.Interface2Int64WithDefault(jsonResult1["ret"], ResponseCodeSuccess))
|
code := int(utils.Interface2Int64WithDefault(jsonResult1["ret"], ResponseCodeSuccess))
|
||||||
if code == ResponseCodeSuccess {
|
if code == ResponseCodeSuccess {
|
||||||
retVal = jsonResult1["data"]
|
retVal = jsonResult1["data"]
|
||||||
|
|||||||
@@ -184,7 +184,10 @@ func (a *API) AccessAPI(apiStr string, jdParams map[string]interface{}) (retVal
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
code := jsonResult1["code"].(string)
|
code := jsonResult1["code"].(string)
|
||||||
if code == ResponseCodeSuccess {
|
if code == ResponseCodeSuccess {
|
||||||
retVal = jsonResult1
|
retVal = jsonResult1
|
||||||
|
|||||||
@@ -181,7 +181,10 @@ func (a *API) AccessStorePage(fullURL string, params map[string]interface{}, isP
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
retVal = jsonResult1
|
retVal = jsonResult1
|
||||||
code := jsonResult1["code"].(string)
|
code := jsonResult1["code"].(string)
|
||||||
if code == ResponseCodeSuccess {
|
if code == ResponseCodeSuccess {
|
||||||
|
|||||||
@@ -215,7 +215,10 @@ func (a *API) AccessAPI(action string, params map[string]interface{}) (retVal *R
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (result string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
code := int(utils.MustInterface2Int64(jsonResult1["code"]))
|
code := int(utils.MustInterface2Int64(jsonResult1["code"]))
|
||||||
retVal = &ResponseResult{
|
retVal = &ResponseResult{
|
||||||
Code: code,
|
Code: code,
|
||||||
|
|||||||
@@ -152,7 +152,10 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
if errObj, ok := jsonResult1["error"]; ok {
|
if errObj, ok := jsonResult1["error"]; ok {
|
||||||
baseapi.SugarLogger.Debugf("mtwm AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true))
|
baseapi.SugarLogger.Debugf("mtwm AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true))
|
||||||
errorInfo := errObj.(map[string]interface{})
|
errorInfo := errObj.(map[string]interface{})
|
||||||
|
|||||||
@@ -77,7 +77,10 @@ func (a *API) AccessUserPage(subURL string, params map[string]interface{}) (retV
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
retVal = jsonResult1
|
retVal = jsonResult1
|
||||||
code := int(utils.MustInterface2Int64(jsonResult1["code"]))
|
code := int(utils.MustInterface2Int64(jsonResult1["code"]))
|
||||||
if code == ResponseCodeSuccess {
|
if code == ResponseCodeSuccess {
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ func getClonedData(requestURL *url.URL, r *bytes.Buffer) string {
|
|||||||
return retVal
|
return retVal
|
||||||
}
|
}
|
||||||
|
|
||||||
func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http.Request, config *APIConfig, handleResponse func(response *http.Response, bodyMap map[string]interface{}) (string, error)) error {
|
func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http.Request, config *APIConfig, handleResponse func(response *http.Response, bodyStr string, bodyMap map[string]interface{}) (string, error)) error {
|
||||||
exceedLimitRetryCount := 0
|
exceedLimitRetryCount := 0
|
||||||
recoverableErrorRetryCount := 0
|
recoverableErrorRetryCount := 0
|
||||||
for {
|
for {
|
||||||
@@ -134,28 +134,35 @@ func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http.
|
|||||||
return ErrHTTPCodeIsNot200
|
return ErrHTTPCodeIsNot200
|
||||||
}
|
}
|
||||||
var (
|
var (
|
||||||
errLevel string
|
errLevel string
|
||||||
bodyMap map[string]interface{}
|
bodyMap map[string]interface{}
|
||||||
|
parseJSONErr error
|
||||||
)
|
)
|
||||||
bodyData, err := ioutil.ReadAll(response.Body)
|
bodyData, err := ioutil.ReadAll(response.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry:%s ioutil.ReadAll failed, url:%v, request:%v, error:%v", trackID, request.URL, getClonedData(request.URL, savedBuf), err)
|
baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry:%s ioutil.ReadAll failed, url:%v, request:%v, error:%v", trackID, request.URL, getClonedData(request.URL, savedBuf), err)
|
||||||
} else if err = utils.TryUnmarshalUseNumber(bodyData, &bodyMap); err != nil {
|
} else if err = utils.TryUnmarshalUseNumber(bodyData, &bodyMap); err != nil {
|
||||||
const maxOutputLen = 200
|
parseJSONErr = err
|
||||||
bodyDataLen := len(bodyData)
|
err = nil // 尝试忽略解析成json错
|
||||||
bodyData2 := bodyData
|
} else {
|
||||||
if bodyDataLen > maxOutputLen {
|
baseapi.SugarLogger.Debugf("AccessPlatformAPIWithRetry:%s url:%v, response:%s", trackID, request.URL, utils.Format4Output(bodyMap, true))
|
||||||
bodyData2 = bodyData2[:maxOutputLen]
|
|
||||||
}
|
|
||||||
baseapi.SugarLogger.Infof("AccessPlatformAPIWithRetry:%s TryUnmarshalUseNumber failed, url:%v, request:%v, error:%v, bodyData:%s", trackID, request.URL, getClonedData(request.URL, savedBuf), err, string(bodyData2))
|
|
||||||
}
|
}
|
||||||
|
errLevel, err = handleResponse(response, string(bodyData), bodyMap)
|
||||||
|
|
||||||
baseapi.SugarLogger.Debugf("AccessPlatformAPIWithRetry:%s url:%v, response:%s", trackID, request.URL, utils.Format4Output(bodyMap, true))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errLevel = ErrLevelRecoverableErr // 读取数据错误,或数据格式错误认为是偶发情况,重试
|
errLevel = ErrLevelRecoverableErr // 读取数据错误,或数据格式错误认为是偶发情况,重试
|
||||||
} else {
|
} else {
|
||||||
errLevel, err = handleResponse(response, bodyMap)
|
if errLevel, err = handleResponse(response, string(bodyData), bodyMap); err != nil && parseJSONErr != nil {
|
||||||
|
const maxOutputLen = 200
|
||||||
|
bodyDataLen := len(bodyData)
|
||||||
|
bodyData2 := bodyData
|
||||||
|
if bodyDataLen > maxOutputLen {
|
||||||
|
bodyData2 = bodyData2[:maxOutputLen]
|
||||||
|
}
|
||||||
|
baseapi.SugarLogger.Infof("AccessPlatformAPIWithRetry:%s TryUnmarshalUseNumber failed, url:%v, request:%v, error:%v, bodyData:%s", trackID, request.URL, getClonedData(request.URL, savedBuf), parseJSONErr, string(bodyData2))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return nil
|
return nil
|
||||||
} else if errLevel == ErrLevelExceedLimit {
|
} else if errLevel == ErrLevelExceedLimit {
|
||||||
|
|||||||
@@ -162,7 +162,10 @@ func (a *API) AccessAPI(apiStr string, apiParams map[string]interface{}) (retVal
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
// baseapi.SugarLogger.Debug(utils.Format4Output(jsonResult1, false))
|
// baseapi.SugarLogger.Debug(utils.Format4Output(jsonResult1, false))
|
||||||
code := ResponseCodeSuccess
|
code := ResponseCodeSuccess
|
||||||
errMsg := ""
|
errMsg := ""
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package weixinapi
|
package weixinapi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -100,7 +101,10 @@ func (a *API) AccessAPI(action string, params map[string]interface{}, body strin
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (result string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
var errInfo *ErrorInfo
|
var errInfo *ErrorInfo
|
||||||
// 微信的返回值,在错误与正常情况下,结构是完全不一样的
|
// 微信的返回值,在错误与正常情况下,结构是完全不一样的
|
||||||
if errCode, ok := jsonResult1["errcode"]; ok {
|
if errCode, ok := jsonResult1["errcode"]; ok {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package xiaowmapi
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi"
|
"git.rosy.net.cn/baseapi"
|
||||||
@@ -80,7 +81,10 @@ func (a *API) AccessAPI(apiName string, apiParams map[string]interface{}) (retVa
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
code := int(utils.Interface2Int64WithDefault(jsonResult1["errno"], ResponseCodeSuccess))
|
code := int(utils.Interface2Int64WithDefault(jsonResult1["errno"], ResponseCodeSuccess))
|
||||||
if code == ResponseCodeSuccess {
|
if code == ResponseCodeSuccess {
|
||||||
retVal = jsonResult1
|
retVal = jsonResult1
|
||||||
|
|||||||
@@ -100,7 +100,10 @@ func (a *API) AccessAPI(apiName string, apiParams map[string]interface{}, token
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
code := utils.Interface2String(jsonResult1["error"])
|
code := utils.Interface2String(jsonResult1["error"])
|
||||||
if code == ResponseCodeSuccess {
|
if code == ResponseCodeSuccess {
|
||||||
retVal, _ = jsonResult1["body"].(map[string]interface{})
|
retVal, _ = jsonResult1["body"].(map[string]interface{})
|
||||||
|
|||||||
@@ -88,7 +88,10 @@ func (a *API) AccessAPI(apiName string, apiParams map[string]interface{}, isGet
|
|||||||
return request
|
return request
|
||||||
},
|
},
|
||||||
a.config,
|
a.config,
|
||||||
func(response *http.Response, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
func(response *http.Response, bodyStr string, jsonResult1 map[string]interface{}) (errLevel string, err error) {
|
||||||
|
if jsonResult1 == nil {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
|
||||||
|
}
|
||||||
code := int(utils.MustInterface2Int64(jsonResult1["errNum"]))
|
code := int(utils.MustInterface2Int64(jsonResult1["errNum"]))
|
||||||
if code == ResponseCodeSuccess {
|
if code == ResponseCodeSuccess {
|
||||||
retVal, _ = jsonResult1["retData"].(map[string]interface{})
|
retVal, _ = jsonResult1["retData"].(map[string]interface{})
|
||||||
|
|||||||
Reference in New Issue
Block a user