- 重要修改相关的函数新增trackInfo参数,追踪修改人.接口类型改变
This commit is contained in:
@@ -112,7 +112,7 @@ func (a *API) signParams(signURL string, params map[string]interface{}) string {
|
||||
return fmt.Sprintf("%x", md5.Sum([]byte(finalStr)))
|
||||
}
|
||||
|
||||
func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{}, resultKey string) (retVal interface{}, err error) {
|
||||
func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{}, resultKey, trackInfo string) (retVal interface{}, err error) {
|
||||
params := make(map[string]interface{})
|
||||
params["timestamp"] = time.Now().Unix()
|
||||
params["app_id"] = a.appID
|
||||
@@ -155,6 +155,9 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{
|
||||
}
|
||||
request.Header.Set("charset", "UTF-8")
|
||||
}
|
||||
if trackInfo != "" {
|
||||
request.Header.Set(platformapi.KeyTrackInfo, trackInfo)
|
||||
}
|
||||
// request.Close = true //todo 为了性能考虑还是不要关闭
|
||||
return request
|
||||
},
|
||||
@@ -184,5 +187,5 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{
|
||||
}
|
||||
|
||||
func (a *API) AccessAPI(cmd string, isGet bool, bizParams map[string]interface{}) (retVal interface{}, err error) {
|
||||
return a.AccessAPI2(cmd, isGet, bizParams, resultKeyData)
|
||||
return a.AccessAPI2(cmd, isGet, bizParams, resultKeyData, "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user