添加打印

This commit is contained in:
邹宗楠
2022-06-23 11:17:24 +08:00
parent b2b5870cf1
commit 5b87dc8a99
2 changed files with 5 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ type EnterpriseController struct {
// 消息结构体将使用创建应用时的EncodingAESKey进行加密特别注意, 在第三方回调事件中使用加解密算法receiveid的内容为suiteid
// ,请参考接收消息解析数据包。
func (e *EnterpriseController) EnterpriseCallback() {
globals.SugarLogger.Debug("==============企业微信通知回调")
r := e.Ctx.Request
switch e.Ctx.Request.Method {
case http.MethodPost:
@@ -35,6 +36,7 @@ func (e *EnterpriseController) EnterpriseCallback() {
wxcpt := call.NewWXBizMsgCrypt(call.Token, call.EncodingAeskey, call.ReceiverId, call.JsonType)
msg, err_ := wxcpt.DecryptMsg(msg_signature, timestamp, nonce, body)
globals.SugarLogger.Debug("==============企业微信通知回调String", string(msg))
if err_.ErrCode != 0 {
e.Abort("404")
return
@@ -61,7 +63,9 @@ func (e *EnterpriseController) EnterpriseCallback() {
//}
//
if strings.Contains(string(msg), "SuiteTicket") {
globals.SugarLogger.Debug("==============企业微信通知回调SuiteTicket")
data, err := api.EnterpriseChatHeadApi.GetEnterpriseMsg(msg)
globals.SugarLogger.Debug("==============企业微信通知回调SuiteTicket->data", data.SuiteTicket)
if err != nil {
globals.SugarLogger.Debug("Unmarshal SuiteTicket err : ", err)
} else {