|
@@ -351,7 +351,13 @@ func postCurl(urlStr string, form url.Values, num int) (body []byte, err error,
|
|
|
return
|
|
|
}
|
|
|
utils.FileLog.Info(fmt.Sprint("post request url:", finalUrl, ";params:", form.Encode(), ";response:", string(body)))
|
|
|
-
|
|
|
+ itemApiLog := new(roadshow.RsCalendarApiLog)
|
|
|
+ itemApiLog.CreateTime = time.Now()
|
|
|
+ itemApiLog.Remark = "post请求上海接口"
|
|
|
+ itemApiLog.Url = urlStr
|
|
|
+ itemApiLog.Body = utils.ReplaceSpaceAndWrap(fmt.Sprint(form))
|
|
|
+ itemApiLog.Result = string(body)
|
|
|
+ go roadshow.AddRsCalendarApiLog(itemApiLog)
|
|
|
//如果是token失效,同时只是第一次请求(没有尝试强制刷新token,那么重新请求)
|
|
|
if response.Code == 4001 && num <= 0 {
|
|
|
//token失效
|
|
@@ -366,14 +372,6 @@ func postCurl(urlStr string, form url.Values, num int) (body []byte, err error,
|
|
|
err = errors.New(response.Msg)
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
- itemApiLog := new(roadshow.RsCalendarApiLog)
|
|
|
- itemApiLog.CreateTime = time.Now()
|
|
|
- itemApiLog.Remark = "post请求上海接口"
|
|
|
- itemApiLog.Url = urlStr
|
|
|
- itemApiLog.Body = utils.ReplaceSpaceAndWrap(fmt.Sprint(form))
|
|
|
- itemApiLog.Result = string(body)
|
|
|
- go roadshow.AddRsCalendarApiLog(itemApiLog)
|
|
|
return
|
|
|
}
|
|
|
|