diff --git a/platformapi/aliupcapi/aliupcapi.go b/platformapi/aliupcapi/aliupcapi.go index de4e8de0..f3ac1a8e 100644 --- a/platformapi/aliupcapi/aliupcapi.go +++ b/platformapi/aliupcapi/aliupcapi.go @@ -6,7 +6,6 @@ import ( "regexp" "strings" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -57,7 +56,6 @@ func (a *API) AccessAPI(action string, params map[string]interface{}) (retVal ma errLevel = platformapi.ErrLevelGeneralFail errMsg := jsonResult1["msg"].(string) err = utils.NewErrorCode(errMsg, utils.Int64ToStr(utils.Interface2Int64WithDefault(jsonResult1["status"], 0))) - baseapi.SugarLogger.Debugf("aliupc AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } @@ -84,7 +82,6 @@ func (a *API) AccessAPI2(action string, params map[string]interface{}) (retVal m errLevel = platformapi.ErrLevelGeneralFail errMsg := "未查询到数据!" err = utils.NewErrorCode(errMsg, "-1") - baseapi.SugarLogger.Debugf("aliupc AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/autonavi/autonavi.go b/platformapi/autonavi/autonavi.go index 64d40013..1e10ae66 100644 --- a/platformapi/autonavi/autonavi.go +++ b/platformapi/autonavi/autonavi.go @@ -239,7 +239,6 @@ func (a *API) signParams(mapData map[string]interface{}) string { finalStr += k + "=" + fmt.Sprint(mapData[k]) } - // baseapi.SugarLogger.Debugf("sign str:%v", finalStr) return fmt.Sprintf("%X", md5.Sum([]byte(finalStr))) } diff --git a/platformapi/autonavi/autonavi_page.go b/platformapi/autonavi/autonavi_page.go index d8bb6fbb..2c23b8eb 100644 --- a/platformapi/autonavi/autonavi_page.go +++ b/platformapi/autonavi/autonavi_page.go @@ -5,7 +5,6 @@ import ( "net/http" "strings" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -31,7 +30,6 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{}) if jsonResult1["info"].(string) != "OK" { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["info"].(string), jsonResult1["infocode"].(string)) - baseapi.SugarLogger.Debugf("autonavi_page AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/baidunavi/baidunavi.go b/platformapi/baidunavi/baidunavi.go index 20fde070..caf52cae 100644 --- a/platformapi/baidunavi/baidunavi.go +++ b/platformapi/baidunavi/baidunavi.go @@ -89,7 +89,6 @@ func (a *API) signParams(apiStr string, mapData map[string]interface{}) string { strList = append(strList, k+"="+url.QueryEscape(fmt.Sprint(mapData[k]))) } finalStr := "/" + apiStr + "?" + strings.Join(strList, "&") + a.sk - // baseapi.SugarLogger.Debugf("sign str:%v", finalStr) finalStr = url.QueryEscape(finalStr) return fmt.Sprintf("%x", md5.Sum([]byte(finalStr))) } diff --git a/platformapi/dadaapi/callback.go b/platformapi/dadaapi/callback.go index f821c964..7aa32361 100644 --- a/platformapi/dadaapi/callback.go +++ b/platformapi/dadaapi/callback.go @@ -53,7 +53,6 @@ func (a *API) signCallbackParams(mapData map[string]interface{}) string { sort.Strings(values) finalStr := strings.Join(values, "") - // baseapi.SugarLogger.Debugf("sign str:%v", finalStr) return fmt.Sprintf("%x", md5.Sum([]byte(finalStr))) } diff --git a/platformapi/dadaapi/dadaapi.go b/platformapi/dadaapi/dadaapi.go index 7d4a6994..7375b753 100644 --- a/platformapi/dadaapi/dadaapi.go +++ b/platformapi/dadaapi/dadaapi.go @@ -91,7 +91,6 @@ func (a *API) signParams(mapData map[string]interface{}) string { } finalStr += a.appSecret - // baseapi.SugarLogger.Debugf("sign str:%v", finalStr) return fmt.Sprintf("%X", md5.Sum([]byte(finalStr))) } diff --git a/platformapi/dingdingapi/callback.go b/platformapi/dingdingapi/callback.go index 5b0461d6..bbbaf830 100644 --- a/platformapi/dingdingapi/callback.go +++ b/platformapi/dingdingapi/callback.go @@ -224,7 +224,6 @@ func (a *API) GetCallbackMsg(formMap map[string]interface{}, bodyData []byte) (m } else { var descryptMsg string if descryptMsg, err = a.Decrypt(formMap["signature"].(string), formMap["timestamp"].(string), formMap["nonce"].(string), encrypt); err == nil { - baseapi.SugarLogger.Debugf("dingding GetCallbackMsg descryptMsg:%s", descryptMsg) err = utils.UnmarshalUseNumber([]byte(descryptMsg), &msgMap) } else { baseapi.SugarLogger.Debugf("dingdingapi GetCallbackMsg, Decrypt err :", err) diff --git a/platformapi/ebaiapi/ebaiapi.go b/platformapi/ebaiapi/ebaiapi.go index 1b79d13a..5d4faf58 100644 --- a/platformapi/ebaiapi/ebaiapi.go +++ b/platformapi/ebaiapi/ebaiapi.go @@ -8,7 +8,6 @@ import ( "sort" "strings" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -92,8 +91,6 @@ func (a *API) GetSource() string { } func (a *API) AccessAPI2(cmd string, body map[string]interface{}, trackInfo string) (retVal *ResponseResult, err error) { - baseapi.SugarLogger.Debugf("ebai AccessAPI cmd:%s", cmd) - // a.speedLimiter.AccessAPI(allAPI) a.speedLimiter.AccessAPI(cmd, a.getShopID(body)) if body == nil { body = make(map[string]interface{}, 0) @@ -133,7 +130,6 @@ func (a *API) AccessAPI2(cmd string, body map[string]interface{}, trackInfo stri if retVal.ErrNo == ResponseCodeSuccess { return platformapi.ErrLevelSuccess, nil } - baseapi.SugarLogger.Debugf("ebai AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) newErr := utils.NewErrorIntCode(retVal.Error, retVal.ErrNo) // todo 临时处理超过阈值错... if (newErr.IntCode() == 20501 && strings.Index(retVal.Error, "阈值") >= 0) || (newErr.IntCode() == 20502 && strings.Index(retVal.Error, "系统繁忙") >= 0) { diff --git a/platformapi/ebaiapi/shop_sku.go b/platformapi/ebaiapi/shop_sku.go index f0463ad2..3d058db2 100644 --- a/platformapi/ebaiapi/shop_sku.go +++ b/platformapi/ebaiapi/shop_sku.go @@ -310,7 +310,6 @@ func (a *API) SkuCreate(trackInfo, shopID string, customSkuID int64, params map[ defParams["brand_name"] = "无" // 很狗血的是,你还必须填个无才行。。。 }*/ params = utils.MergeMaps(params, defParams) - // baseapi.SugarLogger.Debugf(utils.Format4Output(params, false)) result, err := a.AccessAPI2("sku.create", params, trackInfo) if err == nil && result.Data != nil { return utils.Interface2Int64WithDefault(result.Data.(map[string]interface{})[KeySkuID], 0), nil diff --git a/platformapi/ebaiapi/store_page.go b/platformapi/ebaiapi/store_page.go index b94dac1c..db838d03 100644 --- a/platformapi/ebaiapi/store_page.go +++ b/platformapi/ebaiapi/store_page.go @@ -6,7 +6,6 @@ import ( "strings" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -667,7 +666,6 @@ func (a *API) AccessStorePage2(subURL, storeURL2 string, params map[string]inter if code == ResponseCodeCallElmFailed { return platformapi.ErrLevelRecoverableErr, newErr } - baseapi.SugarLogger.Debugf("ebai AccessStorePage failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr }) return retVal, err diff --git a/platformapi/ejyapi/ejyapi.go b/platformapi/ejyapi/ejyapi.go index 97a3f7bb..d16d0d36 100644 --- a/platformapi/ejyapi/ejyapi.go +++ b/platformapi/ejyapi/ejyapi.go @@ -9,7 +9,6 @@ import ( "strings" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -89,7 +88,6 @@ func (a *API) AccessAPI(action string, url string, bizParams map[string]interfac if utils.MustInterface2Int64(jsonResult1["code"]) != 200 { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["msg"].(string), utils.Int64ToStr(utils.MustInterface2Int64(jsonResult1["code"]))) - baseapi.SugarLogger.Debugf("ejiay AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/elmapi/elmapi.go b/platformapi/elmapi/elmapi.go index d7a2a4e1..e5296fdf 100644 --- a/platformapi/elmapi/elmapi.go +++ b/platformapi/elmapi/elmapi.go @@ -11,8 +11,6 @@ import ( "strings" "sync" - "git.rosy.net.cn/baseapi" - "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -63,7 +61,6 @@ type payload struct { } func New(token, appKey, secret string, isProd bool, config ...*platformapi.APIConfig) *API { - // baseapi.SugarLogger.Debugf("token=%v, appKey=%v, secret=%v", token, appKey, secret) curConfig := platformapi.DefAPIConfig if len(config) > 0 { curConfig = *config[0] @@ -120,7 +117,6 @@ func (a *API) signParamsMap(mapData map[string]interface{}, prefix string) strin sort.Strings(keyValues) finalStr := prefix + strings.Join(keyValues, "") + a.secret - // baseapi.SugarLogger.Debugf("sign str:%v", finalStr) return fmt.Sprintf("%X", md5.Sum([]byte(finalStr))) } @@ -180,7 +176,6 @@ func (a *API) AccessAPI(action string, params map[string]interface{}) (retVal *R } else if code == "SERVER_ERROR" || code == "BIZ_SYSTEM_ERROR" || code == "BIZ_1006" || code == "BUSINESS_ERROR" { return platformapi.ErrLevelRecoverableErr, newErr } else { - baseapi.SugarLogger.Debugf("AccessAPI elmapi failed, payload:%v jsonResult1:%v", pl, jsonResult1) return platformapi.ErrLevelCodeIsNotOK, newErr } }) diff --git a/platformapi/enterprise_wechat/wechat_client.go b/platformapi/enterprise_wechat/wechat_client.go index 1f6edbba..00052e35 100644 --- a/platformapi/enterprise_wechat/wechat_client.go +++ b/platformapi/enterprise_wechat/wechat_client.go @@ -4,7 +4,6 @@ import ( "encoding/json" "errors" "fmt" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" "net/http" @@ -126,7 +125,6 @@ func (a *API) AccessAPI(baseUrl, actionApi, method string, bizParams map[string] if utils.MustInterface2Int64(jsonResult1["errcode"]) != 0 { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["errmsg"].(string), utils.Int64ToStr(utils.MustInterface2Int64(jsonResult1["errcode"]))) - baseapi.SugarLogger.Debugf("enterprise wechat AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 return errLevel, err diff --git a/platformapi/feieapi/feieapi.go b/platformapi/feieapi/feieapi.go index bbe6402f..6527bf27 100644 --- a/platformapi/feieapi/feieapi.go +++ b/platformapi/feieapi/feieapi.go @@ -8,7 +8,6 @@ import ( "time" "unicode" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -137,7 +136,6 @@ func (a *API) AccessAPI(apiName string, apiParams map[string]interface{}) (retVa } else if _, ok := canRetryCodes[code]; ok { return platformapi.ErrLevelRecoverableErr, newErr } else { - baseapi.SugarLogger.Debugf("feie AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr } }) diff --git a/platformapi/feieapi/feiepage.go b/platformapi/feieapi/feiepage.go index 98ea90c7..f5e510df 100644 --- a/platformapi/feieapi/feiepage.go +++ b/platformapi/feieapi/feiepage.go @@ -5,7 +5,6 @@ import ( "net/http" "strings" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -31,7 +30,6 @@ func (a *API) AccessStorePage(subURL string, params map[string]interface{}) (ret return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil") } retVal = jsonResult1 - baseapi.SugarLogger.Debugf("ebai AccessStorePage failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelSuccess, err }) return retVal, err diff --git a/platformapi/fnpsapi/callback.go b/platformapi/fnpsapi/callback.go index c4023d71..b596c06a 100644 --- a/platformapi/fnpsapi/callback.go +++ b/platformapi/fnpsapi/callback.go @@ -2,7 +2,6 @@ package fnpsapi import ( "encoding/json" - "git.rosy.net.cn/baseapi" "io/ioutil" "net/http" ) @@ -125,14 +124,12 @@ func (a *API) GetChainstoreStatusNotify(request *http.Request) (shopStatusMsg *C storeNotify := &ShortStatus{} if err := json.Unmarshal(data, &storeNotify); err != nil { - baseapi.SugarLogger.Debugf("FN GetChainstoreStatusNotify failed with err:%v", err) callbackResponse = &CallbackResponse{Code: -1} return nil, callbackResponse } fnNotify := &ChainstoreStatusNotify{} if err := json.Unmarshal([]byte(storeNotify.BusinessData), fnNotify); err != nil { - baseapi.SugarLogger.Debugf("FN callback string to GetChainstoreStatusNotify failed with err:%v", err) callbackResponse = &CallbackResponse{Code: -1} return nil, callbackResponse } @@ -144,7 +141,6 @@ func (a *API) GetChainstoreStatusNotify(request *http.Request) (shopStatusMsg *C func (a *API) GetChainOrderStatusNotify(request *http.Request) (shopStatusMsg *OrderStatusNottify, callbackResponse *CallbackResponse) { data, err := ioutil.ReadAll(request.Body) if err != nil { - baseapi.SugarLogger.Debugf("FN GetChainOrderStatusNotify failed with No result msg err:%v", err) callbackResponse = &CallbackResponse{Code: -1} return nil, callbackResponse } @@ -167,21 +163,18 @@ func (a *API) GetChainOrderStatusNotify(request *http.Request) (shopStatusMsg *O func (a *API) GetChainAbnormaltatusNotify(request *http.Request) (shopStatusMsg *AbnormalStatusNotify, callbackResponse *CallbackResponse) { data, err := ioutil.ReadAll(request.Body) if err != nil { - baseapi.SugarLogger.Debugf("FN GetChainOrderStatusNotify failed with No result msg err:%v", err) callbackResponse = &CallbackResponse{Code: -1} return nil, callbackResponse } storeNotify := &ShortStatus{} if err := json.Unmarshal(data, &storeNotify); err != nil { - baseapi.SugarLogger.Debugf("FN GetShopStatusCallbackMsg failed with err:%v", err) callbackResponse = &CallbackResponse{Code: -1} return nil, callbackResponse } fnNotify := &AbnormalStatusNotify{} if err := json.Unmarshal([]byte(storeNotify.BusinessData), fnNotify); err != nil { - baseapi.SugarLogger.Debugf("FN callback string to ChainstoreStatusNotify failed with err:%v", err) callbackResponse = &CallbackResponse{Code: -1} return nil, callbackResponse } diff --git a/platformapi/fnpsapi/fnpsapi.go b/platformapi/fnpsapi/fnpsapi.go index 8c773654..67630ec7 100644 --- a/platformapi/fnpsapi/fnpsapi.go +++ b/platformapi/fnpsapi/fnpsapi.go @@ -12,7 +12,6 @@ import ( "sync" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -115,7 +114,6 @@ func (a *API) AccessAPI(baseUrl, actionApi, method string, bizParams map[string] if utils.MustInterface2Int64(jsonResult1["code"]) != 200 { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["msg"].(string), utils.Int64ToStr(utils.MustInterface2Int64(jsonResult1["code"]))) - baseapi.SugarLogger.Debugf("fnps AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 return errLevel, err diff --git a/platformapi/fnpsapi_old/fnpsapi.go b/platformapi/fnpsapi_old/fnpsapi.go index d9ea0f46..9fffdb8e 100644 --- a/platformapi/fnpsapi_old/fnpsapi.go +++ b/platformapi/fnpsapi_old/fnpsapi.go @@ -12,7 +12,6 @@ import ( "sync" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -121,7 +120,6 @@ func (a *API) AccessAPI(action string, url string, bizParams map[string]interfac if utils.MustInterface2Int64(jsonResult1["code"]) != 200 { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["msg"].(string), utils.Int64ToStr(utils.MustInterface2Int64(jsonResult1["code"]))) - baseapi.SugarLogger.Debugf("fnps AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/fnpsapi_old/fnpsapiv3.go b/platformapi/fnpsapi_old/fnpsapiv3.go index 24f7111f..993e3d1d 100644 --- a/platformapi/fnpsapi_old/fnpsapiv3.go +++ b/platformapi/fnpsapi_old/fnpsapiv3.go @@ -4,7 +4,6 @@ import ( "crypto/sha1" "encoding/json" "fmt" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" "net/http" @@ -99,7 +98,6 @@ func (a *APIv3) AccessAPIv3(action string, url string, bizParams map[string]inte if utils.MustInterface2Int64(jsonResult1["code"]) != 200 { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["msg"].(string), utils.Int64ToStr(utils.MustInterface2Int64(jsonResult1["code"]))) - baseapi.SugarLogger.Debugf("fnps AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/gome_live_show/guomei_token.go b/platformapi/gome_live_show/guomei_token.go index 857f1fd1..b13935fb 100644 --- a/platformapi/gome_live_show/guomei_token.go +++ b/platformapi/gome_live_show/guomei_token.go @@ -4,7 +4,6 @@ import ( "crypto/md5" "encoding/json" "fmt" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" "net/http" @@ -129,7 +128,6 @@ func (a *API) AccessAPI(baseUrl, actionApi, method string, bizParams map[string] if utils.MustInterface2Int64(jsonResult1["code"]) != 200 { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["message"].(string), utils.Int64ToStr(utils.MustInterface2Int64(jsonResult1["code"]))) - baseapi.SugarLogger.Debugf("gome AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 return errLevel, err diff --git a/platformapi/jcqapi/jcqapi.go b/platformapi/jcqapi/jcqapi.go index daa98898..47166cc8 100644 --- a/platformapi/jcqapi/jcqapi.go +++ b/platformapi/jcqapi/jcqapi.go @@ -10,7 +10,6 @@ import ( "strings" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -115,7 +114,6 @@ func (a *API) AccessAPI(action string, url string, bizParams map[string]interfac if jsonResult1["error"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error"].(map[string]interface{})["message"].(string), jsonResult1["error"].(map[string]interface{})["code"].(string)) - baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/jdapi/jdapi.go b/platformapi/jdapi/jdapi.go index f37c748f..b0ffa7d4 100644 --- a/platformapi/jdapi/jdapi.go +++ b/platformapi/jdapi/jdapi.go @@ -234,7 +234,6 @@ func (a *API) AccessAPI2(apiStr string, jdParams map[string]interface{}, traceIn } else if _, ok := canRetryCodes[code]; ok { return platformapi.ErrLevelRecoverableErr, newErr } else { - baseapi.SugarLogger.Debugf("jd AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr } }) diff --git a/platformapi/jdapi/sku.go b/platformapi/jdapi/sku.go index 51615602..27d711ef 100644 --- a/platformapi/jdapi/sku.go +++ b/platformapi/jdapi/sku.go @@ -661,7 +661,6 @@ func (a *API) BatchAddSku(batchSkuRequestList []*CreateByUpcParam) (pairs []*Cre "batchSkuRequestList": batchSkuRequestList, }, nil, nil, genNoPageResultParser("code", "result", "detail", "0")) if err == nil { - // globals.SugarLogger.Debug(utils.Format4Output(result, false)) // todo 这个API在找不到UPC创建失败时,code也是0,底层不能判断失败 if result2, ok := result.([]interface{}); ok && len(result2) > 0 { detail := utils.Slice2MapSlice(result2) diff --git a/platformapi/jdapi/store_page.go b/platformapi/jdapi/store_page.go index c62397a1..c8a83d4b 100644 --- a/platformapi/jdapi/store_page.go +++ b/platformapi/jdapi/store_page.go @@ -450,7 +450,6 @@ func (a *API) AccessStorePage2(fullURL string, params map[string]interface{}, is } else if _, ok := pageCanRetryCodes[code]; ok { return platformapi.ErrLevelRecoverableErr, newErr } else { - baseapi.SugarLogger.Debugf("jd AccessStorePage failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr } }) @@ -503,7 +502,6 @@ func (a *API) AccessStorePage3(fullURL string, params map[string]interface{}, re } else if _, ok := pageCanRetryCodes[code]; ok { return platformapi.ErrLevelRecoverableErr, newErr } else { - baseapi.SugarLogger.Debugf("jd AccessStorePage failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr } }) @@ -559,7 +557,6 @@ func (a *API) AccessStorePage4(fullURL string, values string) (retVal interface{ } else if _, ok := pageCanRetryCodes[code]; ok { return platformapi.ErrLevelRecoverableErr, newErr } else { - baseapi.SugarLogger.Debugf("jd AccessStorePage failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr } }) diff --git a/platformapi/jdeclpapi/jdeclpapi.go b/platformapi/jdeclpapi/jdeclpapi.go index d55a2a02..24349d57 100644 --- a/platformapi/jdeclpapi/jdeclpapi.go +++ b/platformapi/jdeclpapi/jdeclpapi.go @@ -8,7 +8,6 @@ import ( "strings" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -323,7 +322,6 @@ func (a *API) AccessAPI(action string, url string, bizParams map[string]interfac if jsonResult1["error_response"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error_response"].(map[string]interface{})["zh_desc"].(string), jsonResult1["error_response"].(map[string]interface{})["code"].(string)) - baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/jdshopapi/jdshopapi.go b/platformapi/jdshopapi/jdshopapi.go index e78c19b9..7599265c 100644 --- a/platformapi/jdshopapi/jdshopapi.go +++ b/platformapi/jdshopapi/jdshopapi.go @@ -8,7 +8,6 @@ import ( "strings" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -159,7 +158,6 @@ func (a *API) AccessAPI(action string, url string, bizParams map[string]interfac if jsonResult1["error_response"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error_response"].(map[string]interface{})["zh_desc"].(string), jsonResult1["error_response"].(map[string]interface{})["code"].(string)) - baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } @@ -195,7 +193,6 @@ func (a *API) AccessAPI2(action string, pURL string, bizParams map[string]interf if jsonResult1["error_response"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error_response"].(map[string]interface{})["en_desc"].(string), jsonResult1["error_response"].(map[string]interface{})["code"].(string)) - baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/jdshopapi/store_page.go b/platformapi/jdshopapi/store_page.go index e36da512..e298064b 100644 --- a/platformapi/jdshopapi/store_page.go +++ b/platformapi/jdshopapi/store_page.go @@ -80,7 +80,6 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{}, if jsonResult1["error_response"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error_response"].(map[string]interface{})["zh_desc"].(string), jsonResult1["error_response"].(map[string]interface{})["code"].(string)) - baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } @@ -127,7 +126,6 @@ func (a *API) AccessStorePage2(fullURL string, bizParams map[string]interface{}, if jsonResult1["error_response"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error_response"].(map[string]interface{})["zh_desc"].(string), jsonResult1["error_response"].(map[string]interface{})["code"].(string)) - baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } @@ -162,7 +160,6 @@ func (a *API) AccessStorePage4(fullURL, param string, isPost bool) (retVal map[s if jsonResult1["error_response"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error_response"].(map[string]interface{})["zh_desc"].(string), jsonResult1["error_response"].(map[string]interface{})["code"].(string)) - baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/jdunionapi/jdunionapi.go b/platformapi/jdunionapi/jdunionapi.go index 6a50726d..e5e02590 100644 --- a/platformapi/jdunionapi/jdunionapi.go +++ b/platformapi/jdunionapi/jdunionapi.go @@ -67,7 +67,6 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{}, if jsonResult1["error_response"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error_response"].(map[string]interface{})["zh_desc"].(string), jsonResult1["error_response"].(map[string]interface{})["code"].(string)) - baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/jxprintapi/jxprintapi.go b/platformapi/jxprintapi/jxprintapi.go index 6604f27f..30ce4d91 100644 --- a/platformapi/jxprintapi/jxprintapi.go +++ b/platformapi/jxprintapi/jxprintapi.go @@ -4,7 +4,6 @@ import ( "crypto/md5" "encoding/json" "fmt" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" "net/http" @@ -94,7 +93,6 @@ func (a *API) AccessAPI(apiName string, apiParams map[string]interface{}) (retVa return platformapi.ErrLevelSuccess, nil } newErr := utils.NewErrorIntCode(jsonResult1["desc"].(string), code) - baseapi.SugarLogger.Debugf("jxprint AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr }) return retVal, err diff --git a/platformapi/mtmemberapi/mtmemberapi.go b/platformapi/mtmemberapi/mtmemberapi.go index f23b943f..4877a4f3 100644 --- a/platformapi/mtmemberapi/mtmemberapi.go +++ b/platformapi/mtmemberapi/mtmemberapi.go @@ -5,7 +5,6 @@ import ( "net/http" "strings" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -47,7 +46,6 @@ func (a *API) AccessAPI(action string, url string, bizParams map[string]interfac if utils.MustInterface2Int64(jsonResult1["errorCode"]) != http.StatusOK { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(utils.Interface2String(jsonResult1["errorMsg"]), utils.Int64ToStr(utils.MustInterface2Int64(jsonResult1["errorCode"]))) - baseapi.SugarLogger.Debugf("mtmember AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/mtpsapi/callback.go b/platformapi/mtpsapi/callback.go index ab4fb4f2..8f405787 100644 --- a/platformapi/mtpsapi/callback.go +++ b/platformapi/mtpsapi/callback.go @@ -137,7 +137,6 @@ func (a *API) GetShopStatusCallbackMsg(request *http.Request) (shopStatusMsg *Ca } err := utils.Map2StructByJson(utils.URLValues2Map(request.PostForm), &shopStatusMsg, true) if err != nil { - baseapi.SugarLogger.Debugf("GetShopStatusCallbackMsg failed with err:%v", err) callbackResponse = Err2CallbackResponse(err, "") } return shopStatusMsg, callbackResponse diff --git a/platformapi/mtpsapi/shop_page.go b/platformapi/mtpsapi/shop_page.go index 32137815..63db5154 100644 --- a/platformapi/mtpsapi/shop_page.go +++ b/platformapi/mtpsapi/shop_page.go @@ -5,7 +5,6 @@ import ( "net/http" "strings" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -39,7 +38,6 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{}, if jsonResult1["error_response"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error_response"].(map[string]interface{})["zh_desc"].(string), jsonResult1["error_response"].(map[string]interface{})["code"].(string)) - baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/mtunionapi/mtunionapi.go b/platformapi/mtunionapi/mtunionapi.go index 5a2a9358..74977f33 100644 --- a/platformapi/mtunionapi/mtunionapi.go +++ b/platformapi/mtunionapi/mtunionapi.go @@ -8,7 +8,6 @@ import ( "sort" "strings" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -89,7 +88,6 @@ func (a *API) AccessAPI(action string, isPost bool, bizParams map[string]interfa if utils.MustInterface2Int64(jsonResult1["status"]) != 0 { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["des"].(string), utils.Int64ToStr(utils.MustInterface2Int64(jsonResult1["status"]))) - baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } @@ -157,7 +155,6 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{}, if jsonResult1["error_response"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error_response"].(map[string]interface{})["zh_desc"].(string), jsonResult1["error_response"].(map[string]interface{})["code"].(string)) - baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/mtwmapi/act_page.go b/platformapi/mtwmapi/act_page.go index 7f518d2f..08eaaee3 100644 --- a/platformapi/mtwmapi/act_page.go +++ b/platformapi/mtwmapi/act_page.go @@ -6,7 +6,6 @@ import ( "net/http" "strings" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -45,7 +44,6 @@ func (a *API) AccessActPage(subURL string, params map[string]interface{}, isPost return platformapi.ErrLevelSuccess, nil } newErr := utils.NewErrorIntCode(jsonResult1["msg"].(string), code) - baseapi.SugarLogger.Debugf("mtwm AccessUserPage failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr }) return retVal, err @@ -84,7 +82,6 @@ func (a *API) AccessActPage2(subURL string, params map[string]interface{}, isPos return platformapi.ErrLevelSuccess, nil } newErr := utils.NewErrorIntCode(jsonResult1["msg"].(string), code) - baseapi.SugarLogger.Debugf("mtwm AccessUserPage failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr }) return retVal, err diff --git a/platformapi/mtwmapi/callback.go b/platformapi/mtwmapi/callback.go index 90f227da..dc3c4aad 100644 --- a/platformapi/mtwmapi/callback.go +++ b/platformapi/mtwmapi/callback.go @@ -100,7 +100,6 @@ func (a *API) GetCallbackMsg(request *http.Request) (msg *CallbackMsg, callbackR cmd := strings.Trim(request.URL.EscapedPath(), "/") cmd = cmd[strings.LastIndex(cmd, "/")+1:] // if sign != dataSign.(string) && cmd != MsgTypeStoreStatusChanged { - // baseapi.SugarLogger.Debugf("mtwm GetCallbackMsg my sign:%v, data sign:%v", sign, dataSign.(string)) // callbackResponse = SignatureIsNotOk // } else { msg = &CallbackMsg{ diff --git a/platformapi/mtwmapi/mtwmapi.go b/platformapi/mtwmapi/mtwmapi.go index 164b7e53..6a128807 100644 --- a/platformapi/mtwmapi/mtwmapi.go +++ b/platformapi/mtwmapi/mtwmapi.go @@ -11,7 +11,6 @@ import ( "strings" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -193,7 +192,6 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{ errorInfo := errObj.(map[string]interface{}) errCode := int(utils.MustInterface2Int64(errorInfo["code"])) if errCode != ErrCodeSuccess { - baseapi.SugarLogger.Debugf("mtwm AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) newErr := utils.NewErrorIntCode(errorInfo["msg"].(string), errCode) if canRetryCodes[errCode] == 1 { return platformapi.ErrLevelExceedLimit, newErr @@ -248,7 +246,6 @@ func (a *API) AccessAPI3(cmd string, isGet bool, bizParams map[string]interface{ if errObj, ok := jsonResult1["data"]; ok { errorInfo := errObj.(string) if errorInfo != "ok" { - baseapi.SugarLogger.Debugf("mtwm AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) newErr := utils.NewErrorIntCode(jsonResult1["error_list"].([]interface{})[0].(map[string]interface{})["msg"].(string), int(utils.MustInterface2Int64(jsonResult1["error_list"].([]interface{})[0].(map[string]interface{})["code"]))) return errLevel, newErr } diff --git a/platformapi/mtwmapi/user_page.go b/platformapi/mtwmapi/user_page.go index f1a3d525..f3236f50 100644 --- a/platformapi/mtwmapi/user_page.go +++ b/platformapi/mtwmapi/user_page.go @@ -5,7 +5,6 @@ import ( "net/http" "strings" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -96,7 +95,6 @@ func (a *API) AccessUserPage2(subURL string, params map[string]interface{}, isPo return platformapi.ErrLevelSuccess, nil } newErr := utils.NewErrorIntCode(jsonResult1["msg"].(string), code) - baseapi.SugarLogger.Debugf("mtwm AccessUserPage failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr }) return retVal, err diff --git a/platformapi/pddapi/pdd.go b/platformapi/pddapi/pdd.go index ae71aae9..a0546508 100644 --- a/platformapi/pddapi/pdd.go +++ b/platformapi/pddapi/pdd.go @@ -4,7 +4,6 @@ import ( "crypto/md5" "encoding/json" "fmt" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" "net/http" @@ -89,7 +88,6 @@ func (a *API) AccessAPI(action string, isPost bool, bizParams map[string]interfa if jsonResult1["error_response"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error_response"].(map[string]interface{})["sub_msg"].(string), utils.Int64ToStr(utils.MustInterface2Int64(jsonResult1["error_response"].(map[string]interface{})["sub_code"]))) - baseapi.SugarLogger.Debugf("pdd AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } @@ -127,7 +125,6 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{}, if jsonResult1["error_response"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error_response"].(map[string]interface{})["zh_desc"].(string), jsonResult1["error_response"].(map[string]interface{})["code"].(string)) - baseapi.SugarLogger.Debugf("pdd AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/platformapi.go b/platformapi/platformapi.go index 73406ee7..cf8522f1 100644 --- a/platformapi/platformapi.go +++ b/platformapi/platformapi.go @@ -5,6 +5,7 @@ import ( "compress/gzip" "errors" "fmt" + "git.rosy.net.cn/jx-callback/globals" "io/ioutil" "math" "net" @@ -117,18 +118,15 @@ func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http. request.Header.Del(KeyTrackInfo) } trackInfo += ", " + utils.GetUUID() - baseapi.SugarLogger.Debugf("begin AccessPlatformAPIWithRetry:%s do:%s url:%v, request:%s", trackInfo, request.Method, request.URL, getClonedData(request.URL, savedBuf)) response, err := client.Do(request) usedMilliSecond := time.Now().Sub(beginTime) / time.Millisecond - baseapi.SugarLogger.Debugf("end AccessPlatformAPIWithRetry:%s do:%s url:%v, usedMilliSecond:%d", trackInfo, request.Method, request.URL, usedMilliSecond) if err != nil { - baseapi.SugarLogger.Debugf("AccessPlatformAPIWithRetry:%s client.Get return err:%v", trackInfo, err) err, ok := err.(net.Error) + globals.SugarLogger.Debugf("AccessPlatformAPIWithRetry err %s", err) recoverableErrorRetryCount++ if ok /*&& err.Timeout()*/ && recoverableErrorRetryCount <= config.MaxRecoverableRetryCount { // 只要是网络错误都重试 continue } else { - baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry:%s access api url:%v, error:%v", trackInfo, request.URL, err) return ErrAPIAccessFailed } } diff --git a/platformapi/platformapi_cookie.go b/platformapi/platformapi_cookie.go index db766183..57e0759b 100644 --- a/platformapi/platformapi_cookie.go +++ b/platformapi/platformapi_cookie.go @@ -35,7 +35,6 @@ func (a *APICookie) SetCookieWithStr(cookieStr string) { v := utils.TrimBlankChar(pair[1]) if k != "" && v != "" { a.SetCookie(k, v) - // baseapi.SugarLogger.Debugf("%s=%s", k, v) } } } diff --git a/platformapi/q_bida/q_bida_access.go b/platformapi/q_bida/q_bida_access.go index efe41d35..63d1c65b 100644 --- a/platformapi/q_bida/q_bida_access.go +++ b/platformapi/q_bida/q_bida_access.go @@ -117,7 +117,6 @@ func (a *Api) AccessInfo(baseUrl, url, requestMethods string, param map[string]i return platformapi.ErrLevelSuccess, nil } newErr := utils.NewErrorIntCode(jsonResult1["msg"].(string), code) - baseapi.SugarLogger.Debugf("QBiDa AccessUserPage failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr }) return retVal, err diff --git a/platformapi/sfps/callback.go b/platformapi/sfps/callback.go index c4023d71..14acab8d 100644 --- a/platformapi/sfps/callback.go +++ b/platformapi/sfps/callback.go @@ -125,14 +125,12 @@ func (a *API) GetChainstoreStatusNotify(request *http.Request) (shopStatusMsg *C storeNotify := &ShortStatus{} if err := json.Unmarshal(data, &storeNotify); err != nil { - baseapi.SugarLogger.Debugf("FN GetChainstoreStatusNotify failed with err:%v", err) callbackResponse = &CallbackResponse{Code: -1} return nil, callbackResponse } fnNotify := &ChainstoreStatusNotify{} if err := json.Unmarshal([]byte(storeNotify.BusinessData), fnNotify); err != nil { - baseapi.SugarLogger.Debugf("FN callback string to GetChainstoreStatusNotify failed with err:%v", err) callbackResponse = &CallbackResponse{Code: -1} return nil, callbackResponse } @@ -144,7 +142,6 @@ func (a *API) GetChainstoreStatusNotify(request *http.Request) (shopStatusMsg *C func (a *API) GetChainOrderStatusNotify(request *http.Request) (shopStatusMsg *OrderStatusNottify, callbackResponse *CallbackResponse) { data, err := ioutil.ReadAll(request.Body) if err != nil { - baseapi.SugarLogger.Debugf("FN GetChainOrderStatusNotify failed with No result msg err:%v", err) callbackResponse = &CallbackResponse{Code: -1} return nil, callbackResponse } @@ -167,7 +164,6 @@ func (a *API) GetChainOrderStatusNotify(request *http.Request) (shopStatusMsg *O func (a *API) GetChainAbnormaltatusNotify(request *http.Request) (shopStatusMsg *AbnormalStatusNotify, callbackResponse *CallbackResponse) { data, err := ioutil.ReadAll(request.Body) if err != nil { - baseapi.SugarLogger.Debugf("FN GetChainOrderStatusNotify failed with No result msg err:%v", err) callbackResponse = &CallbackResponse{Code: -1} return nil, callbackResponse } @@ -181,7 +177,6 @@ func (a *API) GetChainAbnormaltatusNotify(request *http.Request) (shopStatusMsg fnNotify := &AbnormalStatusNotify{} if err := json.Unmarshal([]byte(storeNotify.BusinessData), fnNotify); err != nil { - baseapi.SugarLogger.Debugf("FN callback string to ChainstoreStatusNotify failed with err:%v", err) callbackResponse = &CallbackResponse{Code: -1} return nil, callbackResponse } diff --git a/platformapi/sfps/sfpsapi.go b/platformapi/sfps/sfpsapi.go index 9d1d43da..05e68a98 100644 --- a/platformapi/sfps/sfpsapi.go +++ b/platformapi/sfps/sfpsapi.go @@ -10,7 +10,6 @@ import ( "sync" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -94,7 +93,6 @@ func (a *API) AccessAPI(baseUrl, actionApi, method string, bizParams map[string] if utils.MustInterface2Int64(jsonResult1["code"]) != 200 { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["msg"].(string), utils.Int64ToStr(utils.MustInterface2Int64(jsonResult1["code"]))) - baseapi.SugarLogger.Debugf("sfps AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 return errLevel, err diff --git a/platformapi/tbunionapi/tbunionapi.go b/platformapi/tbunionapi/tbunionapi.go index 27f7c719..993ba701 100644 --- a/platformapi/tbunionapi/tbunionapi.go +++ b/platformapi/tbunionapi/tbunionapi.go @@ -4,7 +4,6 @@ import ( "crypto/md5" "encoding/json" "fmt" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" "net/http" @@ -94,7 +93,6 @@ func (a *API) AccessAPI(action string, isPost bool, bizParams map[string]interfa if jsonResult1["error_response"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error_response"].(map[string]interface{})["msg"].(string), utils.Int64ToStr(utils.MustInterface2Int64(jsonResult1["error_response"].(map[string]interface{})["code"]))) - baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } @@ -132,7 +130,6 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{}, if jsonResult1["error_response"] != nil { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["error_response"].(map[string]interface{})["zh_desc"].(string), jsonResult1["error_response"].(map[string]interface{})["code"].(string)) - baseapi.SugarLogger.Debugf("jdeclp AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/tibiotapi/tibiotapi.go b/platformapi/tibiotapi/tibiotapi.go index 12cab099..0de53bf2 100644 --- a/platformapi/tibiotapi/tibiotapi.go +++ b/platformapi/tibiotapi/tibiotapi.go @@ -4,7 +4,6 @@ import ( "crypto/md5" "encoding/json" "fmt" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" "net/http" @@ -91,7 +90,6 @@ func (a *API) AccessAPI(url string, apiParams map[string]interface{}, isJson boo return platformapi.ErrLevelSuccess, nil } newErr := utils.NewErrorIntCode(jsonResult1["message"].(string), code) - baseapi.SugarLogger.Debugf("tibiot AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr }) return retVal, err diff --git a/platformapi/tiktok/tiktok.go b/platformapi/tiktok/tiktok.go index 5b1e46db..13bf25b5 100644 --- a/platformapi/tiktok/tiktok.go +++ b/platformapi/tiktok/tiktok.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" "git.rosy.net.cn/baseapi/platformapi" - "git.rosy.net.cn/jx-callback/globals" "net/http" "strings" ) @@ -49,6 +48,5 @@ func (a *API) AccessAPI2(url string, params map[string]interface{}) (retVal map[ retVal = jsonResult1 return platformapi.ErrLevelSuccess, nil }) - globals.SugarLogger.Debug("我也不知道哪里出错,返回一下retVal", retVal) return retVal, err } diff --git a/platformapi/tiktok/tiktok_token.go b/platformapi/tiktok/tiktok_token.go index 18aac462..614b2818 100644 --- a/platformapi/tiktok/tiktok_token.go +++ b/platformapi/tiktok/tiktok_token.go @@ -3,18 +3,15 @@ package tiktok import ( "errors" "git.rosy.net.cn/baseapi/utils" - "git.rosy.net.cn/jx-callback/globals" ) // 获取抖音登录授权2 func (a *API) GetTiktokOauth(code string) (*TiktokOauthResone, error) { - globals.SugarLogger.Debug("初始code=============", code) tokenReq := make(map[string]interface{}, 3) tokenReq["appid"] = a.GetAppID() tokenReq["code"] = code tokenReq["secret"] = a.GetSecret() tokenReq["anonymous_code"] = "" - globals.SugarLogger.Debug("输出tokenReq", tokenReq) result, err := a.AccessAPI2(GetTiktokOauth, tokenReq) if err != nil { return nil, err @@ -28,7 +25,6 @@ func (a *API) GetTiktokOauth(code string) (*TiktokOauthResone, error) { if oauthAccessToken.ErrNo != 0 { return nil, errors.New(oauthAccessToken.ErrTips) } - globals.SugarLogger.Debug("再来输出一下oauthAccessToken", oauthAccessToken) return oauthAccessToken, nil } diff --git a/platformapi/tiktok_shop/tiktok_api/afs_test.go b/platformapi/tiktok_shop/tiktok_api/afs_test.go index 1dfcc52c..c50bf31f 100644 --- a/platformapi/tiktok_shop/tiktok_api/afs_test.go +++ b/platformapi/tiktok_shop/tiktok_api/afs_test.go @@ -5,7 +5,7 @@ import ( "testing" ) -var token = `{"access_token":"60f530b2-9ab6-4723-b487-c094918f0d21","expires_in":1666257163,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"1220666a-5e88-458c-a8c0-06d949fbbd3f","authority_id":""}` +var token = `{"access_token":"47690a84-3cc2-4958-abf9-41cc7fca5f82","expires_in":1666862533,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"66ea2395-07c7-409d-84ae-93ac1e600b74","authority_id":""}` var a = New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token) // 查询售后单详情 diff --git a/platformapi/tiktok_shop/tiktok_api/api.go b/platformapi/tiktok_shop/tiktok_api/api.go index 72fc3745..6b5006c4 100644 --- a/platformapi/tiktok_shop/tiktok_api/api.go +++ b/platformapi/tiktok_shop/tiktok_api/api.go @@ -140,11 +140,6 @@ func (a *API) SetAccessToken(token string) { a.accessToken = access.AccessToken a.refreshToken = access.RefreshToken a.expiresIn = access.ExpiresIn - if access.ExpiresIn > time.Now().Unix() { - a.accessTokenObj = access - } else { - a.RefreshToken() - } - + a.accessTokenObj = access return } diff --git a/platformapi/tiktok_shop/tiktok_api/api_test.go b/platformapi/tiktok_shop/tiktok_api/api_test.go index 4e1dde78..ca2064d6 100644 --- a/platformapi/tiktok_shop/tiktok_api/api_test.go +++ b/platformapi/tiktok_shop/tiktok_api/api_test.go @@ -30,8 +30,8 @@ func TestQueryOrderDetail(t *testing.T) { } func TestRefaseToken(t *testing.T) { - a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", "") - a.CreateToken("bb52688c-7bca-4b64-8747-5258a9a6ba33") + a.CreateToken("c2bcf85f-f8de-4c9e-bcdc-97d792ce7156") + //a.RefreshToken() // {"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652230,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authority_id":""} //{"access_token":"37f41ac7-49ac-4848-a0ee-ea86bb0dfd9f","expires_in":519389,"scope":"SCOPE","shop_id":"","shop_name":"抖店开放平台测试专用店","refresh_token":"3dd8f638-fdf1-46e7-b974-88df382f03c6","authority_id" :""} } @@ -90,3 +90,7 @@ func TestGetSettleBillDetailV3(t *testing.T) { func TestLogisticsAddSinglePack(t *testing.T) { a.LogisticsAddSinglePack() } + +func TestYearDay(t *testing.T) { + fmt.Println(time.Now().YearDay()) +} diff --git a/platformapi/tiktok_shop/tiktok_api/order.go b/platformapi/tiktok_shop/tiktok_api/order.go index 8516e606..4c48f527 100644 --- a/platformapi/tiktok_shop/tiktok_api/order.go +++ b/platformapi/tiktok_shop/tiktok_api/order.go @@ -4,7 +4,6 @@ import ( "encoding/json" "errors" "fmt" - "git.rosy.net.cn/baseapi" address_list_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/address_list/request" afterSale_applyMarketAfterSale_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/afterSale_ApplyMarketAfterSale/request" afterSale_Detail_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/afterSale_Detail/request" @@ -20,7 +19,6 @@ import ( order_orderDetail_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/order_orderDetail/response" order_searchList_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/order_searchList/request" "git.rosy.net.cn/baseapi/utils" - "git.rosy.net.cn/jx-callback/globals" "math" "time" ) @@ -327,7 +325,6 @@ func (a *API) LogisticsAdd(orderId string, companyCode string, isRefundReject bo func (a *API) CreateOrderCallback(orderStatus []byte) (map[string][]interface{}, *CallbackResponse) { var resp []*OrderCallback if err := json.Unmarshal(orderStatus, &resp); err != nil { - baseapi.SugarLogger.Debugf("Tiktok Notify failed with err:%v", err) return nil, &CallbackResponse{Code: CallbackFailCode, Msg: CallbackFail} } @@ -346,7 +343,6 @@ func (a *API) CreateOrderCallback(orderStatus []byte) (map[string][]interface{}, return nil, CallbackResponseErr(false) } callbackResult[CallbackPayOrderMsgTagId] = append(callbackResult[CallbackPayOrderMsgTagId], create) - globals.SugarLogger.Debugf("CallbackPayOrderMsgTagId======%s", utils.Format4Output(callbackResult, false)) case CallbackWaitOrderMsgTagId: // 支付订单待处理(风控审核) create := WaitOrderData{} if err := json.Unmarshal([]byte(data.Data), &create); err != nil { diff --git a/platformapi/tiktok_shop/tiktok_api/sku.go b/platformapi/tiktok_shop/tiktok_api/sku.go index d898e783..36247a7b 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku.go +++ b/platformapi/tiktok_shop/tiktok_api/sku.go @@ -23,8 +23,6 @@ import ( sku_editPrice_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/sku_editPrice/request" sku_syncStock_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/sku_syncStock/request" sku_syncStockBatch_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/sku_syncStockBatch/request" - "git.rosy.net.cn/baseapi/utils" - "git.rosy.net.cn/jx-callback/globals" ) // UpdateSkuStock @@ -99,7 +97,6 @@ func (a *API) GetCatePropertyV2(categoryLeftId int64) (*product_getCatePropertyV if err != nil { return nil, err } - globals.SugarLogger.Debugf("GetCatePropertyV2-------------api:=%s", utils.Format4Output(result, false)) if result.Code != RequestSuccessCode { return nil, errors.New(result.SubMsg) } @@ -112,7 +109,6 @@ func (a *API) CreateStoreCommodity(skuParam *product_addV2_request.ProductAddV2P request.Param = skuParam result, err := request.Execute(a.accessTokenObj) - globals.SugarLogger.Debugf("CreateStoreCommodity-------------api:=%s", utils.Format4Output(result, false)) if err != nil { return nil, err } diff --git a/platformapi/tiktok_shop/tiktok_api/store.go b/platformapi/tiktok_shop/tiktok_api/store.go index 36c77261..5305f01b 100644 --- a/platformapi/tiktok_shop/tiktok_api/store.go +++ b/platformapi/tiktok_shop/tiktok_api/store.go @@ -46,8 +46,6 @@ import ( warehouse_list_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_list/response" warehouse_setFence_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_setFence/request" warehouse_unbindStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_unbindStore/request" - "git.rosy.net.cn/baseapi/utils" - "git.rosy.net.cn/jx-callback/globals" ) //GetStoreDetail 单个获取门店信息 @@ -66,7 +64,6 @@ func (a *API) GetStoreDetail(param *shop_getStoreDetail_request.ShopGetStoreDeta //BatchCreateStore 批量创建门店 func (a *API) BatchCreateStore(param *shop_batchCreateStore_request.ShopBatchCreateStoreParam) (*shop_batchCreateStore_response.ShopBatchCreateStoreData, error) { - globals.SugarLogger.Debugf("BatchCreateStore:%s", utils.Format4Output(param, true)) request := shop_batchCreateStore_request.New() request.Param = param response, err := request.Execute(a.accessTokenObj) @@ -81,7 +78,6 @@ func (a *API) BatchCreateStore(param *shop_batchCreateStore_request.ShopBatchCre // EditStore 编辑门店 func (a *API) EditStore(param *shop_editStore_request.ShopEditStoreParam) error { - globals.SugarLogger.Debugf("EditStore EditStore:%s", utils.Format4Output(param, true)) request := shop_editStore_request.New() request.Param = param response, err := request.Execute(a.accessTokenObj) diff --git a/platformapi/tonglianpayapi/tonglianpayapi.go b/platformapi/tonglianpayapi/tonglianpayapi.go index 91f83d43..8ae688d9 100644 --- a/platformapi/tonglianpayapi/tonglianpayapi.go +++ b/platformapi/tonglianpayapi/tonglianpayapi.go @@ -7,7 +7,6 @@ import ( "sort" "strings" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -176,7 +175,6 @@ func (a *API) AccessAPI(action string, bizParams map[string]interface{}) (retVal if returnCode != TrxStatusSuccess { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(utils.Interface2String(jsonResult1["errmsg"])+utils.Interface2String(jsonResult1["retmsg"]), returnCode) - baseapi.SugarLogger.Debugf("tonglianpay AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/txcloudapi/txcloudapi.go b/platformapi/txcloudapi/txcloudapi.go index 97959356..7291c025 100644 --- a/platformapi/txcloudapi/txcloudapi.go +++ b/platformapi/txcloudapi/txcloudapi.go @@ -8,7 +8,6 @@ import ( "net/http" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -83,7 +82,6 @@ func (a *API) AccessAPI(url string, params map[string]interface{}) (retVal map[s if jsonResult1["code"].(string) != "OK" { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["msg"].(string), jsonResult1["code"].(string)) - baseapi.SugarLogger.Debugf("txcloud AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } @@ -113,7 +111,6 @@ func (a *API) AccessAPI2(url string, params map[string]interface{}) (retVal map[ if !jsonResult1["Result"].(map[string]interface{})["success"].(bool) { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["Result"].(map[string]interface{})["errMsg"].(string), "false") - baseapi.SugarLogger.Debugf("txcloud AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/unipushapi/unipushapi.go b/platformapi/unipushapi/unipushapi.go index 57dff84c..cf8136d0 100644 --- a/platformapi/unipushapi/unipushapi.go +++ b/platformapi/unipushapi/unipushapi.go @@ -10,7 +10,6 @@ import ( "sync" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -96,7 +95,6 @@ func (a *API) AccessAPI(action string, bizParams map[string]interface{}) (retVal if jsonResult1["msg"].(string) != "success" { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["msg"].(string), utils.Int64ToStr(utils.MustInterface2Int64(jsonResult1["code"]))) - baseapi.SugarLogger.Debugf("unipush AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1["data"].(map[string]interface{}) } @@ -124,7 +122,6 @@ func (a *API) AccessAPI2(action string, bizParams map[string]interface{}) (retVa if jsonResult1["msg"].(string) != "success" { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["msg"].(string), utils.Int64ToStr(utils.MustInterface2Int64(jsonResult1["code"]))) - baseapi.SugarLogger.Debugf("unipush AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/weimobapi/weimobapi.go b/platformapi/weimobapi/weimobapi.go index db293bf4..dc0255e6 100644 --- a/platformapi/weimobapi/weimobapi.go +++ b/platformapi/weimobapi/weimobapi.go @@ -9,7 +9,6 @@ import ( "net/http" "sync" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -195,7 +194,6 @@ func (a *API) AccessAPI(apiStr string, apiParams map[string]interface{}) (retVal } else if _, ok := canRetryCodes[code]; ok { return platformapi.ErrLevelRecoverableErr, newErr } else { - baseapi.SugarLogger.Debugf("weimob AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr } }) diff --git a/platformapi/weixinapi/msg.go b/platformapi/weixinapi/msg.go index da63c665..90450b5e 100644 --- a/platformapi/weixinapi/msg.go +++ b/platformapi/weixinapi/msg.go @@ -5,8 +5,6 @@ import ( "fmt" "sort" "strings" - - "git.rosy.net.cn/baseapi" ) func (a *API) SetMsgTokenAndKey(msgToken, msgKey string) { @@ -36,6 +34,5 @@ func (a *API) ValidateWXCallbackURL(signature, timestamp, nonce string) (isValid } sort.Sort(sort.StringSlice(strList)) sha1Str := fmt.Sprintf("%x", sha1.Sum([]byte(strings.Join(strList, "")))) - baseapi.SugarLogger.Debugf("ValidateWXCallbackURL sha1Str:%s, signature:%s", sha1Str, signature) return sha1Str == signature } diff --git a/platformapi/wxpayapi/wxpayapi.go b/platformapi/wxpayapi/wxpayapi.go index ae44ff5a..b75f9af3 100644 --- a/platformapi/wxpayapi/wxpayapi.go +++ b/platformapi/wxpayapi/wxpayapi.go @@ -502,7 +502,6 @@ func (a *API) AccessAPI(action string, requestParam IRequestBase) (retVal map[st if utils.Interface2String(retVal["result_code"]) != ResponseCodeSuccess { err = utils.NewErrorCode(utils.Interface2String(retVal["err_code_des"]), utils.Interface2String(retVal["err_code"])) if err != nil { - baseapi.SugarLogger.Debugf("wxpay AccessAPI %s failed:%s, err:%v", signStr, strings.ReplaceAll(responseStr, "\\n", " "), err) } retVal = nil } diff --git a/platformapi/xiaowmapi/xiaowmapi.go b/platformapi/xiaowmapi/xiaowmapi.go index 81b5c3de..f8940661 100644 --- a/platformapi/xiaowmapi/xiaowmapi.go +++ b/platformapi/xiaowmapi/xiaowmapi.go @@ -5,7 +5,6 @@ import ( "fmt" "net/http" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -96,7 +95,6 @@ func (a *API) AccessAPI(apiName string, apiParams map[string]interface{}) (retVa } else if _, ok := canRetryCodes[code]; ok { return platformapi.ErrLevelRecoverableErr, newErr } else { - baseapi.SugarLogger.Debugf("xiaowm AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr } }) diff --git a/platformapi/yilianyunapi/yilianyunapi.go b/platformapi/yilianyunapi/yilianyunapi.go index bffd82a1..f2f5a107 100644 --- a/platformapi/yilianyunapi/yilianyunapi.go +++ b/platformapi/yilianyunapi/yilianyunapi.go @@ -8,7 +8,6 @@ import ( "sync" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -124,7 +123,6 @@ func (a *API) AccessAPI(apiName string, apiParams map[string]interface{}, token } else if _, ok := canRetryCodes[code]; ok { return platformapi.ErrLevelRecoverableErr, newErr } else { - baseapi.SugarLogger.Debugf("yilianyun AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr } }) diff --git a/platformapi/yinbaoapi/store_page.go b/platformapi/yinbaoapi/store_page.go index 44c945a7..4b9179e0 100644 --- a/platformapi/yinbaoapi/store_page.go +++ b/platformapi/yinbaoapi/store_page.go @@ -46,7 +46,6 @@ func (a *API) AccessStorePage(action string, bizParams map[string]interface{}) ( if !jsonResult1["successed"].(bool) { errLevel = platformapi.ErrLevelGeneralFail err = utils.NewErrorCode(jsonResult1["msg"].(string), "-1", 0) - baseapi.SugarLogger.Debugf("yinbao AccessStorePageAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } } else { errLevel = platformapi.ErrLevelGeneralFail diff --git a/platformapi/yinbaoapi/yinbaoapi.go b/platformapi/yinbaoapi/yinbaoapi.go index f8b4f925..8305f675 100644 --- a/platformapi/yinbaoapi/yinbaoapi.go +++ b/platformapi/yinbaoapi/yinbaoapi.go @@ -9,7 +9,6 @@ import ( "strings" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -100,7 +99,6 @@ func (a *API) AccessAPI(action string, bizParams map[string]interface{}) (retVal errMsg += v.(string) } err = utils.NewErrorCode(errMsg, utils.Int64ToStr(utils.Interface2Int64WithDefault(jsonResult1["errorCode"], 0))) - baseapi.SugarLogger.Debugf("yinbao AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) } retVal = jsonResult1 } diff --git a/platformapi/zhongwuapi/zhongwuapi.go b/platformapi/zhongwuapi/zhongwuapi.go index 3298bdfc..c96d488b 100644 --- a/platformapi/zhongwuapi/zhongwuapi.go +++ b/platformapi/zhongwuapi/zhongwuapi.go @@ -8,7 +8,6 @@ import ( "strings" "time" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" "git.rosy.net.cn/baseapi/utils" ) @@ -103,7 +102,6 @@ func (a *API) AccessAPI(apiName string, apiParams map[string]interface{}, isGet } else if _, ok := canRetryCodes[code]; ok { return platformapi.ErrLevelRecoverableErr, newErr } else { - baseapi.SugarLogger.Debugf("zhongwu AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr } }) diff --git a/utils/routinepool/routinepool.go b/utils/routinepool/routinepool.go index 7bce03e9..ae15da00 100644 --- a/utils/routinepool/routinepool.go +++ b/utils/routinepool/routinepool.go @@ -6,7 +6,6 @@ import ( "fmt" "runtime/debug" - "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/utils" ) @@ -60,7 +59,6 @@ func callHandler(handler func()) (retVal interface{}) { func taskFun(taskChan chan *TaskParam, index int) { for { taskParam := <-taskChan - baseapi.SugarLogger.Debugf("routine:%d, handle task:%v", index, taskParam.handler) result := callHandler(taskParam.handler) if taskParam.resultChan != nil { taskParam.resultChan <- result diff --git a/utils/utils_crypt.go b/utils/utils_crypt.go index c2da0500..01053d73 100644 --- a/utils/utils_crypt.go +++ b/utils/utils_crypt.go @@ -4,8 +4,6 @@ import ( "bytes" "crypto/aes" "crypto/cipher" - - "git.rosy.net.cn/baseapi" ) func AESCBCEncpryt(data, aesKey, iv []byte) (encryptedData []byte, err error) { @@ -36,7 +34,6 @@ func PKCSUnPadding(originData []byte) []byte { length := len(originData) unpadding := int(originData[length-1]) originData = originData[:(length - unpadding)] - baseapi.SugarLogger.Debugf("PKCSUnPadding, length:%d, unpadding:%d", length, unpadding) return originData }