From 017547f20b9a4e26e882c8901c0577149e397ff9 Mon Sep 17 00:00:00 2001 From: jiangyong Date: Sat, 13 Sep 2025 11:49:26 +0800 Subject: [PATCH 1/5] logdebug --- qyweixin/app.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qyweixin/app.go b/qyweixin/app.go index 2c51944..1ec9f5c 100644 --- a/qyweixin/app.go +++ b/qyweixin/app.go @@ -11,9 +11,9 @@ import ( "git.u8t.cn/open/gosdk/wechat/cache" "git.u8t.cn/open/gosdk/wechat/message" wutil "git.u8t.cn/open/gosdk/wechat/util" + "git.u8t.cn/open/goutil" "github.com/gin-gonic/gin" log "github.com/sirupsen/logrus" - "git.u8t.cn/open/goutil" "github.com/spf13/cast" "io" "io/ioutil" @@ -354,7 +354,7 @@ func (q *App) Callback(ctx *gin.Context) { _, resp, err := wutil.DecryptMsg(wechatConfig.AppID, ctx.Query("echostr"), wechatConfig.EncodingAESKey) if err != nil { - log.Errorf("DecryptMsg failed! appid[%s] aeskey[%s] error:%s ", wechatConfig.AppID, wechatConfig.EncodingAESKey, err.Error()) + log.Errorf("DecryptMsg failed! wechatConfig[%s] error:%s ", goutil.EncodeJSON(wechatConfig), err.Error()) return } ctx.Data(http.StatusOK, "Content-type: text/plain", resp) From 5c33808b836948faf6567b9bb65fcb027cadc519 Mon Sep 17 00:00:00 2001 From: jiangyong Date: Sat, 13 Sep 2025 11:58:58 +0800 Subject: [PATCH 2/5] log --- qyweixin/app.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/qyweixin/app.go b/qyweixin/app.go index 1ec9f5c..86bf229 100644 --- a/qyweixin/app.go +++ b/qyweixin/app.go @@ -68,12 +68,12 @@ type BaseResponse struct { } type AppConfig struct { - Corpid string - Secret string - Agent string - Token string - AesKey string - Replay func(message.MixMessage) *message.Reply + Corpid string `json:"corpid"` + Secret string `json:"secret"` + Agent string `json:"agent"` + Token string `json:"token"` + AesKey string `json:"aes_key"` + Replay func(message.MixMessage) *message.Reply `json:"-"` } type App struct { @@ -354,7 +354,7 @@ func (q *App) Callback(ctx *gin.Context) { _, resp, err := wutil.DecryptMsg(wechatConfig.AppID, ctx.Query("echostr"), wechatConfig.EncodingAESKey) if err != nil { - log.Errorf("DecryptMsg failed! wechatConfig[%s] error:%s ", goutil.EncodeJSON(wechatConfig), err.Error()) + log.Errorf("DecryptMsg failed! wechatConfig[%s] error:%s ", goutil.EncodeJSON(q.config), err.Error()) return } ctx.Data(http.StatusOK, "Content-type: text/plain", resp) From f75837fd8683a3c74d14cdc6129a36ae65b5e3a3 Mon Sep 17 00:00:00 2001 From: jiangyong Date: Sat, 13 Sep 2025 12:19:23 +0800 Subject: [PATCH 3/5] log --- qyweixin/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qyweixin/app.go b/qyweixin/app.go index 86bf229..633bda1 100644 --- a/qyweixin/app.go +++ b/qyweixin/app.go @@ -371,7 +371,7 @@ func (q *App) Callback(ctx *gin.Context) { server.SetDebug(true) err := server.Serve() if err != nil { - log.Errorf("qiye weixin Service [%s] err:%s", goutil.EncodeJSON(wechatConfig), err.Error()) + log.Errorf("qiye weixin Service [%s] err:%s", goutil.EncodeJSON(q.config), err.Error()) return } err = server.Send() From 7656870851ef0bc0a2ec61db97efbf4cf919cf93 Mon Sep 17 00:00:00 2001 From: pengwenchuan Date: Mon, 22 Sep 2025 16:03:30 +0800 Subject: [PATCH 4/5] =?UTF-8?q?gin=E7=A0=B4=E5=9D=8F=E6=80=A7=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=EF=BC=8C=E5=AF=BC=E8=87=B4=E6=88=91=E4=BB=AC=E7=9A=84?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=83=BD=E7=BC=96=E8=AF=91=E4=B8=8D=E4=BA=86?= =?UTF-8?q?=EF=BC=8Cgin=20context.go=20Keys=20map[string]any=20=E4=B8=8B?= =?UTF-8?q?=E4=B8=AA=E7=89=88=E6=9C=AC=E5=8F=98=E6=88=90=E4=BA=86=20Keys?= =?UTF-8?q?=20map[any]any=EF=BC=8C=E6=89=80=E4=BB=A5=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go.mod b/go.mod index 238e315..33b0209 100644 --- a/go.mod +++ b/go.mod @@ -62,3 +62,5 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/fileutil v1.0.0 // indirect ) + +replace github.com/gin-gonic/gin v1.10.1 => github.com/gin-gonic/gin v1.10.1 From 5762064979c4bb57fc9341c62a2c6e87a0e03a47 Mon Sep 17 00:00:00 2001 From: pengwenchuan Date: Mon, 22 Sep 2025 16:22:14 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=8F=91=E7=8E=B0go.mod=E9=87=8C=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E5=9B=BA=E5=AE=9A=E7=89=88=E6=9C=AC=E5=8F=B7=E4=B8=8D?= =?UTF-8?q?=E5=A5=BD=E4=BD=BF=EF=BC=8C=E5=BE=97=E5=9C=A8go=20build?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E9=80=9A=E8=BF=87go=20get=E6=9D=A5=E9=99=8D?= =?UTF-8?q?=E7=BA=A7=EF=BC=8C=E6=89=80=E4=BB=A5=E5=9B=9E=E6=BB=9A=E4=B8=8A?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.mod b/go.mod index 33b0209..238e315 100644 --- a/go.mod +++ b/go.mod @@ -62,5 +62,3 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect modernc.org/fileutil v1.0.0 // indirect ) - -replace github.com/gin-gonic/gin v1.10.1 => github.com/gin-gonic/gin v1.10.1