This commit is contained in:
邹宗楠
2022-10-24 11:22:08 +08:00
parent 24b8b4ad97
commit c43d4d5f29
6 changed files with 1 additions and 10 deletions

View File

@@ -33,7 +33,6 @@ func (a *API) GetOrderCallbackMsg(data []byte) (orderMsg *WayBillInfo) {
callbackInfo := &CallBackInfo{} callbackInfo := &CallBackInfo{}
err := utils.UnmarshalUseNumber(data, callbackInfo) err := utils.UnmarshalUseNumber(data, callbackInfo)
if err != nil { if err != nil {
globals.SugarLogger.Debugf("fn msg faild %v, err : %v", string(data), err)
return nil return nil
} }
if err == nil { if err == nil {

View File

@@ -65,7 +65,6 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{},
request, _ = http.NewRequest(http.MethodGet, utils.GenerateGetURL(fullURL, "", bizParams), nil) request, _ = http.NewRequest(http.MethodGet, utils.GenerateGetURL(fullURL, "", bizParams), nil)
} }
a.FillRequestCookies(request) a.FillRequestCookies(request)
//globals.SugarLogger.Debugf("AccessStorePageAccessStorePageAccessStorePage request", utils.Format4Output(request, true))
return request return request
}, },
a.config, a.config,

View File

@@ -3,7 +3,6 @@ package jdunionapi
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"git.rosy.net.cn/baseapi"
"git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/platformapi"
"git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/baseapi/utils"
"net/http" "net/http"

View File

@@ -5,7 +5,6 @@ import (
"compress/gzip" "compress/gzip"
"errors" "errors"
"fmt" "fmt"
"git.rosy.net.cn/jx-callback/globals"
"io/ioutil" "io/ioutil"
"math" "math"
"net" "net"
@@ -122,7 +121,7 @@ func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http.
usedMilliSecond := time.Now().Sub(beginTime) / time.Millisecond usedMilliSecond := time.Now().Sub(beginTime) / time.Millisecond
if err != nil { if err != nil {
err, ok := err.(net.Error) err, ok := err.(net.Error)
globals.SugarLogger.Debugf("AccessPlatformAPIWithRetry err %s", err) baseapi.SugarLogger.Infof("err %s", err)
recoverableErrorRetryCount++ recoverableErrorRetryCount++
if ok /*&& err.Timeout()*/ && recoverableErrorRetryCount <= config.MaxRecoverableRetryCount { // 只要是网络错误都重试 if ok /*&& err.Timeout()*/ && recoverableErrorRetryCount <= config.MaxRecoverableRetryCount { // 只要是网络错误都重试
continue continue

View File

@@ -45,7 +45,5 @@ package q_bida
// Width: 100, // Width: 100,
// SendPhone: "18981810340", // SendPhone: "18981810340",
// }) // })
// globals.SugarLogger.Debug("err===", err)
// globals.SugarLogger.Debug("data===", &result)
// //
//} //}

View File

@@ -5,7 +5,6 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"git.rosy.net.cn/baseapi"
"git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/platformapi"
"git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/baseapi/utils"
"net/http" "net/http"
@@ -39,8 +38,6 @@ func (a *Api) SetExpirationTime(expiration int64) {
// NewQBiDa 初始化token // NewQBiDa 初始化token
func NewQBiDa(account, password string, config ...*platformapi.APIConfig) *Api { func NewQBiDa(account, password string, config ...*platformapi.APIConfig) *Api {
//account = "18048531223"
//password = "18080188338"
if account == "" || password == "" { if account == "" || password == "" {
account = "18048531223" account = "18048531223"
password = "18080188338" password = "18080188338"