package wechatcallback import ( "encoding/json" "encoding/xml" "fmt" "gin_server_admin/commonus" ) func templateEventPush(eventMsg []byte) { var msgContent TemplateCardPush err := xml.Unmarshal(eventMsg, &msgContent) if nil != err { fmt.Println("***********Unmarshal fail") } fmt.Printf("button======>%v\n", msgContent) jsonStr, _ := json.Marshal(msgContent) fmt.Printf("jsonStr======>%v\n", string(jsonStr)) var updateButtonNotClickable commonus.UpdateButtonNotClickable updateButtonNotClickable.Userids = append(updateButtonNotClickable.Userids, "KaiXinGuo") updateButtonNotClickable.Atall = 0 updateButtonNotClickable.Agentid = msgContent.Agentid updateButtonNotClickable.ResponseCode = msgContent.ResponseCode updateButtonNotClickable.Button.ReplaceName = "已提交更新" callbakcMsg, isTrueCall, callBackCont := updateButtonNotClickable.UpdateSendButtonMessage() fmt.Printf("更新销售发送信息返回:%v-----------%v----------->%v\n", string(callbakcMsg), isTrueCall, callBackCont) }