From c8634d17f96ea9de4161754d9a736cd89ece7e6c Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Mon, 22 Jan 2024 22:58:56 +0800 Subject: [PATCH] wechat --- server/controller/qyweixin.go | 3 +++ server/service/qyweixin_approve.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/server/controller/qyweixin.go b/server/controller/qyweixin.go index 274a891..919e829 100644 --- a/server/controller/qyweixin.go +++ b/server/controller/qyweixin.go @@ -2,6 +2,7 @@ package controller import ( "enterprise/common/config" + "enterprise/server/service" "github.com/gin-gonic/gin" "gitlab.batiao8.com/open/gosdk/qyweixin" ) @@ -12,12 +13,14 @@ type QyWeixin struct { func (q *QyWeixin) Approve(ctx *gin.Context) { cfg := config.GetConfig() + reply := new(service.Approve).Reply qyApp := qyweixin.NewApp(&qyweixin.AppConfig{ Corpid: cfg.QyWeixin.Corpid, Secret: cfg.QyWeixin.ApproveSecret, Agent: cfg.QyWeixin.ApproveAgent, Token: config.QyWeixinAgentToken, AesKey: config.QyWeixinAgentAesKey, + Replay: reply, }) qyApp.Callback(ctx) diff --git a/server/service/qyweixin_approve.go b/server/service/qyweixin_approve.go index 945f4f0..203659f 100644 --- a/server/service/qyweixin_approve.go +++ b/server/service/qyweixin_approve.go @@ -2,7 +2,6 @@ package service import ( butil "enterprise/base/util" - "enterprise/base/wechat/message" "enterprise/common/config" "enterprise/common/dao" "enterprise/common/global" @@ -12,6 +11,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/smbrave/goutil" "gitlab.batiao8.com/open/gosdk/qyweixin" + "gitlab.batiao8.com/open/gosdk/wechat/message" "strings" )