From 4277e191521806bd924b0b21c2e51bcacea4e5ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 3 Apr 2024 14:31:40 +0800 Subject: [PATCH] 1 --- business/jxutils/tasks/configrefresh.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/business/jxutils/tasks/configrefresh.go b/business/jxutils/tasks/configrefresh.go index f4eae0428..3ca370c09 100644 --- a/business/jxutils/tasks/configrefresh.go +++ b/business/jxutils/tasks/configrefresh.go @@ -138,9 +138,7 @@ func RefreshWeixinToken() (err error) { func RefreshWeixin2Token() (err error) { if api.WeixinMiniAPI2 != nil { - globals.SugarLogger.Debugf("=========globals.WeixinMiniAPI2() = :%v", api.WeixinMiniAPI2) err = RefreshConfig("wechat2", weixinTokenExpires, func() (token string, expireTimeStr string, invalidParameter string) { - globals.SugarLogger.Debugf("=========globals.IsMainProductEnv() = :%s", utils.Format4Output(globals.IsMainProductEnv(), false)) if globals.IsMainProductEnv() { if tokenInfo, err := api.WeixinMiniAPI2.CBRetrieveToken(); err == nil { token = tokenInfo.AccessToken @@ -149,8 +147,6 @@ func RefreshWeixin2Token() (err error) { } } else { tokenInfo := getWX2TokenFromRemote(api.WeixinMiniAPI2.CBGetToken()) - globals.SugarLogger.Debugf("=========globals.tokenInfo() = :%s", utils.Format4Output(tokenInfo, false)) - globals.SugarLogger.Debugf("=========globals.CBGetToken() = :%s", utils.Format4Output(api.WeixinMiniAPI2.CBGetToken(), false)) if tokenInfo != nil { expireTimeStr = utils.Time2Str(time.Now().Add(-weixinTokenExpires)) token = tokenInfo.Token @@ -379,7 +375,7 @@ func getWXTokenFromRemote(oldToken string) (tokenInfo *syseventhub.TokenInfo) { func getWX2TokenFromRemote(oldToken string) (tokenInfo *syseventhub.TokenInfo) { if !globals.IsMainProductEnv() && globals.GetWeixinTokenKey != "" && globals.GetWeixinTokenURL != "" { - tokenInfo = PollingRemotEvent(globals.GetWeixinTokenURL, 0, map[string]interface{}{ + tokenInfo = PollingRemotEvent(globals.GetWeixin2TokenURL, 0, map[string]interface{}{ "oldToken": oldToken, }) }