github.com/chanxuehong/wechat@v0.0.0-20230222024006-36f0325263cd/mp/poi/event.go (about) 1 package poi 2 3 import ( 4 "github.com/chanxuehong/wechat/mp/core" 5 ) 6 7 const ( 8 EventTypePoiCheckNotify core.EventType = "poi_check_notify" // 审核事件推送 9 ) 10 11 // 创建门店审核事件推送 12 type PoiCheckNotifyEvent struct { 13 XMLName struct{} `xml:"xml" json:"-"` 14 core.MsgHeader 15 EventType core.EventType `xml:"Event" json:"Event"` // 事件类型,poi_check_notify 16 UniqId string `xml:"UniqId" json:"UniqId"` // 商户自己内部ID,即字段中的sid 17 PoiId int64 `xml:"PoiId" json:"PoiId"` // 微信的门店ID,微信内门店唯一标示ID 18 Result string `xml:"Result" json:"Result"` // 审核结果,成功succ 或失败fail 19 Msg string `xml:"Msg" json:"Msg"` // 成功的通知信息,或审核失败的驳回理由 20 } 21 22 func GetPoiCheckNotifyEvent(msg *core.MixedMsg) *PoiCheckNotifyEvent { 23 return &PoiCheckNotifyEvent{ 24 MsgHeader: msg.MsgHeader, 25 EventType: msg.EventType, 26 UniqId: msg.UniqId, 27 PoiId: msg.PoiId, 28 Result: msg.Result, 29 Msg: msg.Msg, 30 } 31 }