diff --git a/business/enterprise/enterprise.go b/business/enterprise/enterprise.go index 7b2d5c25c..ff380a0ac 100644 --- a/business/enterprise/enterprise.go +++ b/business/enterprise/enterprise.go @@ -31,7 +31,7 @@ func UpdateEnterpriseSuite(data *enterprise_wechat.SuiteTicketInfo) error { if data.SuiteTicket != "" && data.TimeStamp > 0 { EnterpriseSuite = data } - + globals.SugarLogger.Debug("修改数据库配置数据-》", data.SuiteTicket) // 修改数据库 db := dao.GetDB() config := &legacymodel.Config{ diff --git a/controllers/enterprise_callback.go b/controllers/enterprise_callback.go index 83c763b55..b350229ae 100644 --- a/controllers/enterprise_callback.go +++ b/controllers/enterprise_callback.go @@ -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 {