This commit is contained in:
jiangyong27 2024-01-22 22:58:56 +08:00
parent 367f92f55d
commit c8634d17f9
2 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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"
)