diff --git "a/apis/\346\224\266\351\223\266\345\217\260-\345\210\233\345\273\272\346\224\266\346\254\276\350\256\242\345\215\225.go" "b/apis/\346\224\266\351\223\266\345\217\260-\345\210\233\345\273\272\346\224\266\346\254\276\350\256\242\345\215\225.go" index 3d6e02f..06118bf 100755 --- "a/apis/\346\224\266\351\223\266\345\217\260-\345\210\233\345\273\272\346\224\266\346\254\276\350\256\242\345\215\225.go" +++ "b/apis/\346\224\266\351\223\266\345\217\260-\345\210\233\345\273\272\346\224\266\346\254\276\350\256\242\345\215\225.go" @@ -9,12 +9,15 @@ import ( type ( ReqOpenOrderPaytool struct { - BusinessType int `json:"business_type"` - CustomCorpid string `json:"custom_corpid,omitempty"` - ProductList PaytoolProductList `json:"product_list"` - NonceStr string `json:"nonce_str"` - Ts int `json:"ts"` - Sig string `json:"sig"` + BusinessType int `json:"business_type"` + PayType int `json:"pay_type"` + BankReceiptMediaId string `json:"bank_receipt_media_id,omitempty"` + Creator string `json:"creator,omitempty"` + CustomCorpid string `json:"custom_corpid,omitempty"` + ProductList PaytoolProductList `json:"product_list"` + NonceStr string `json:"nonce_str"` + Ts int `json:"ts"` + Sig string `json:"sig"` } PaytoolProductList struct { diff --git "a/apis/\350\216\267\345\256\242\345\212\251\346\211\213-\346\237\245\350\257\242\345\211\251\344\275\231\344\275\277\347\224\250\351\207\217.go" "b/apis/\350\216\267\345\256\242\345\212\251\346\211\213-\346\237\245\350\257\242\345\211\251\344\275\231\344\275\277\347\224\250\351\207\217.go" index 894be6b..78ed6f1 100755 --- "a/apis/\350\216\267\345\256\242\345\212\251\346\211\213-\346\237\245\350\257\242\345\211\251\344\275\231\344\275\277\347\224\250\351\207\217.go" +++ "b/apis/\350\216\267\345\256\242\345\212\251\346\211\213-\346\237\245\350\257\242\345\211\251\344\275\231\344\275\277\347\224\250\351\207\217.go" @@ -34,6 +34,11 @@ type RespCustomerAcquisitionQuotaExternalcontact struct { CommonResp // Total 历史累计使用量 Total int `json:"total"` + // QuotaList 过期额度 + QuotaList []struct { + ExpireDate int `json:"expire_date"` + Balance int `json:"balance"` + } `json:"quota_list"` } var _ bodyer = RespCustomerAcquisitionQuotaExternalcontact{} diff --git "a/callbacks/event\344\275\277\347\224\250\351\207\217\345\267\262\347\273\217\350\200\227\345\260\275\344\272\213\344\273\266.go" "b/callbacks/event\344\275\277\347\224\250\351\207\217\345\267\262\347\273\217\350\200\227\345\260\275\344\272\213\344\273\266.go" new file mode 100755 index 0000000..8de9696 --- /dev/null +++ "b/callbacks/event\344\275\277\347\224\250\351\207\217\345\267\262\347\273\217\350\200\227\345\260\275\344\272\213\344\273\266.go" @@ -0,0 +1,56 @@ +package callbacks + +import "encoding/xml" + +// 自动生成的回调结构,按需修改, 生成方式: make callback doc=微信文档地址url +// 文档: https://developer.work.weixin.qq.com/document/path/97299#使用量已经耗尽事件 + +func init() { + //添加可解析的回调事件 + supportCallback(EventCustomerAcquisitionBalanceExhausted{}) +} + +type EventCustomerAcquisitionBalanceExhausted struct { + XMLName xml.Name `xml:"xml"` + Text string `xml:",chardata"` + ToUserName struct { + Text string `xml:",chardata"` + } `xml:"ToUserName"` + FromUserName struct { + Text string `xml:",chardata"` + } `xml:"FromUserName"` + CreateTime struct { + Text string `xml:",chardata"` + } `xml:"CreateTime"` + MsgType struct { + Text string `xml:",chardata"` + } `xml:"MsgType"` + Event struct { + Text string `xml:",chardata"` + } `xml:"Event"` + ChangeType struct { + Text string `xml:",chardata"` + } `xml:"ChangeType"` +} + +func (EventCustomerAcquisitionBalanceExhausted) GetMessageType() string { + return "event" +} + +func (EventCustomerAcquisitionBalanceExhausted) GetEventType() string { + return "customer_acquisition" +} + +func (EventCustomerAcquisitionBalanceExhausted) GetChangeType() string { + return "balance_exhausted" +} + +func (m EventCustomerAcquisitionBalanceExhausted) GetTypeKey() string { + return m.GetMessageType() + ":" + m.GetEventType() + ":" + m.GetChangeType() +} + +func (EventCustomerAcquisitionBalanceExhausted) ParseFromXml(data []byte) (CallBackExtraInfoInterface, error) { + var temp EventCustomerAcquisitionBalanceExhausted + err := xml.Unmarshal(data, &temp) + return temp, err +} diff --git "a/callbacks/event\345\210\240\351\231\244\350\216\267\345\256\242\351\223\276\346\216\245\344\272\213\344\273\266.go" "b/callbacks/event\345\210\240\351\231\244\350\216\267\345\256\242\351\223\276\346\216\245\344\272\213\344\273\266.go" new file mode 100755 index 0000000..21e2063 --- /dev/null +++ "b/callbacks/event\345\210\240\351\231\244\350\216\267\345\256\242\351\223\276\346\216\245\344\272\213\344\273\266.go" @@ -0,0 +1,59 @@ +package callbacks + +import "encoding/xml" + +// 自动生成的回调结构,按需修改, 生成方式: make callback doc=微信文档地址url +// 文档: https://developer.work.weixin.qq.com/document/path/97299#删除获客链接事件 + +func init() { + //添加可解析的回调事件 + supportCallback(EventCustomerAcquisitionDeleteLink{}) +} + +type EventCustomerAcquisitionDeleteLink struct { + XMLName xml.Name `xml:"xml"` + Text string `xml:",chardata"` + ToUserName struct { + Text string `xml:",chardata"` + } `xml:"ToUserName"` + FromUserName struct { + Text string `xml:",chardata"` + } `xml:"FromUserName"` + CreateTime struct { + Text string `xml:",chardata"` + } `xml:"CreateTime"` + MsgType struct { + Text string `xml:",chardata"` + } `xml:"MsgType"` + Event struct { + Text string `xml:",chardata"` + } `xml:"Event"` + ChangeType struct { + Text string `xml:",chardata"` + } `xml:"ChangeType"` + LinkId struct { + Text string `xml:",chardata"` + } `xml:"LinkId"` +} + +func (EventCustomerAcquisitionDeleteLink) GetMessageType() string { + return "event" +} + +func (EventCustomerAcquisitionDeleteLink) GetEventType() string { + return "customer_acquisition" +} + +func (EventCustomerAcquisitionDeleteLink) GetChangeType() string { + return "delete_link" +} + +func (m EventCustomerAcquisitionDeleteLink) GetTypeKey() string { + return m.GetMessageType() + ":" + m.GetEventType() + ":" + m.GetChangeType() +} + +func (EventCustomerAcquisitionDeleteLink) ParseFromXml(data []byte) (CallBackExtraInfoInterface, error) { + var temp EventCustomerAcquisitionDeleteLink + err := xml.Unmarshal(data, &temp) + return temp, err +} diff --git "a/callbacks/event\345\276\256\344\277\241\345\256\242\346\210\267\345\217\221\350\265\267\344\274\232\350\257\235\344\272\213\344\273\266.go" "b/callbacks/event\345\276\256\344\277\241\345\256\242\346\210\267\345\217\221\350\265\267\344\274\232\350\257\235\344\272\213\344\273\266.go" new file mode 100755 index 0000000..367c473 --- /dev/null +++ "b/callbacks/event\345\276\256\344\277\241\345\256\242\346\210\267\345\217\221\350\265\267\344\274\232\350\257\235\344\272\213\344\273\266.go" @@ -0,0 +1,62 @@ +package callbacks + +import "encoding/xml" + +// 自动生成的回调结构,按需修改, 生成方式: make callback doc=微信文档地址url +// 文档: https://developer.work.weixin.qq.com/document/path/97299#微信客户发起会话事件 + +func init() { + //添加可解析的回调事件 + supportCallback(EventCustomerAcquisitionCustomerStartChat{}) +} + +type EventCustomerAcquisitionCustomerStartChat struct { + XMLName xml.Name `xml:"xml"` + Text string `xml:",chardata"` + ToUserName struct { + Text string `xml:",chardata"` + } `xml:"ToUserName"` + FromUserName struct { + Text string `xml:",chardata"` + } `xml:"FromUserName"` + CreateTime struct { + Text string `xml:",chardata"` + } `xml:"CreateTime"` + MsgType struct { + Text string `xml:",chardata"` + } `xml:"MsgType"` + Event struct { + Text string `xml:",chardata"` + } `xml:"Event"` + ChangeType struct { + Text string `xml:",chardata"` + } `xml:"ChangeType"` + UserID struct { + Text string `xml:",chardata"` + } `xml:"UserID"` + ExternalUserID struct { + Text string `xml:",chardata"` + } `xml:"ExternalUserID"` +} + +func (EventCustomerAcquisitionCustomerStartChat) GetMessageType() string { + return "event" +} + +func (EventCustomerAcquisitionCustomerStartChat) GetEventType() string { + return "customer_acquisition" +} + +func (EventCustomerAcquisitionCustomerStartChat) GetChangeType() string { + return "customer_start_chat" +} + +func (m EventCustomerAcquisitionCustomerStartChat) GetTypeKey() string { + return m.GetMessageType() + ":" + m.GetEventType() + ":" + m.GetChangeType() +} + +func (EventCustomerAcquisitionCustomerStartChat) ParseFromXml(data []byte) (CallBackExtraInfoInterface, error) { + var temp EventCustomerAcquisitionCustomerStartChat + err := xml.Unmarshal(data, &temp) + return temp, err +} diff --git "a/callbacks/event\350\216\267\345\256\242\351\223\276\346\216\245\344\270\215\345\217\257\347\224\250\344\272\213\344\273\266.go" "b/callbacks/event\350\216\267\345\256\242\351\223\276\346\216\245\344\270\215\345\217\257\347\224\250\344\272\213\344\273\266.go" new file mode 100755 index 0000000..3544775 --- /dev/null +++ "b/callbacks/event\350\216\267\345\256\242\351\223\276\346\216\245\344\270\215\345\217\257\347\224\250\344\272\213\344\273\266.go" @@ -0,0 +1,59 @@ +package callbacks + +import "encoding/xml" + +// 自动生成的回调结构,按需修改, 生成方式: make callback doc=微信文档地址url +// 文档: https://developer.work.weixin.qq.com/document/path/97299#获客链接不可用事件 + +func init() { + //添加可解析的回调事件 + supportCallback(EventCustomerAcquisitionLinkUnavailable{}) +} + +type EventCustomerAcquisitionLinkUnavailable struct { + XMLName xml.Name `xml:"xml"` + Text string `xml:",chardata"` + ToUserName struct { + Text string `xml:",chardata"` + } `xml:"ToUserName"` + FromUserName struct { + Text string `xml:",chardata"` + } `xml:"FromUserName"` + CreateTime struct { + Text string `xml:",chardata"` + } `xml:"CreateTime"` + MsgType struct { + Text string `xml:",chardata"` + } `xml:"MsgType"` + Event struct { + Text string `xml:",chardata"` + } `xml:"Event"` + ChangeType struct { + Text string `xml:",chardata"` + } `xml:"ChangeType"` + LinkId struct { + Text string `xml:",chardata"` + } `xml:"LinkId"` +} + +func (EventCustomerAcquisitionLinkUnavailable) GetMessageType() string { + return "event" +} + +func (EventCustomerAcquisitionLinkUnavailable) GetEventType() string { + return "customer_acquisition" +} + +func (EventCustomerAcquisitionLinkUnavailable) GetChangeType() string { + return "link_unavailable" +} + +func (m EventCustomerAcquisitionLinkUnavailable) GetTypeKey() string { + return m.GetMessageType() + ":" + m.GetEventType() + ":" + m.GetChangeType() +} + +func (EventCustomerAcquisitionLinkUnavailable) ParseFromXml(data []byte) (CallBackExtraInfoInterface, error) { + var temp EventCustomerAcquisitionLinkUnavailable + err := xml.Unmarshal(data, &temp) + return temp, err +} diff --git "a/callbacks/event\350\216\267\345\256\242\351\242\235\345\272\246\345\215\263\345\260\206\350\200\227\345\260\275\344\272\213\344\273\266.go" "b/callbacks/event\350\216\267\345\256\242\351\242\235\345\272\246\345\215\263\345\260\206\350\200\227\345\260\275\344\272\213\344\273\266.go" new file mode 100755 index 0000000..662f34b --- /dev/null +++ "b/callbacks/event\350\216\267\345\256\242\351\242\235\345\272\246\345\215\263\345\260\206\350\200\227\345\260\275\344\272\213\344\273\266.go" @@ -0,0 +1,56 @@ +package callbacks + +import "encoding/xml" + +// 自动生成的回调结构,按需修改, 生成方式: make callback doc=微信文档地址url +// 文档: https://developer.work.weixin.qq.com/document/path/97299#获客额度即将耗尽事件 + +func init() { + //添加可解析的回调事件 + supportCallback(EventCustomerAcquisitionBalanceLow{}) +} + +type EventCustomerAcquisitionBalanceLow struct { + XMLName xml.Name `xml:"xml"` + Text string `xml:",chardata"` + ToUserName struct { + Text string `xml:",chardata"` + } `xml:"ToUserName"` + FromUserName struct { + Text string `xml:",chardata"` + } `xml:"FromUserName"` + CreateTime struct { + Text string `xml:",chardata"` + } `xml:"CreateTime"` + MsgType struct { + Text string `xml:",chardata"` + } `xml:"MsgType"` + Event struct { + Text string `xml:",chardata"` + } `xml:"Event"` + ChangeType struct { + Text string `xml:",chardata"` + } `xml:"ChangeType"` +} + +func (EventCustomerAcquisitionBalanceLow) GetMessageType() string { + return "event" +} + +func (EventCustomerAcquisitionBalanceLow) GetEventType() string { + return "customer_acquisition" +} + +func (EventCustomerAcquisitionBalanceLow) GetChangeType() string { + return "balance_low" +} + +func (m EventCustomerAcquisitionBalanceLow) GetTypeKey() string { + return m.GetMessageType() + ":" + m.GetEventType() + ":" + m.GetChangeType() +} + +func (EventCustomerAcquisitionBalanceLow) ParseFromXml(data []byte) (CallBackExtraInfoInterface, error) { + var temp EventCustomerAcquisitionBalanceLow + err := xml.Unmarshal(data, &temp) + return temp, err +} diff --git "a/callbacks/event\351\200\232\350\277\207\350\216\267\345\256\242\351\223\276\346\216\245\347\224\263\350\257\267\345\245\275\345\217\213\344\272\213\344\273\266.go" "b/callbacks/event\351\200\232\350\277\207\350\216\267\345\256\242\351\223\276\346\216\245\347\224\263\350\257\267\345\245\275\345\217\213\344\272\213\344\273\266.go" new file mode 100755 index 0000000..7c102a9 --- /dev/null +++ "b/callbacks/event\351\200\232\350\277\207\350\216\267\345\256\242\351\223\276\346\216\245\347\224\263\350\257\267\345\245\275\345\217\213\344\272\213\344\273\266.go" @@ -0,0 +1,62 @@ +package callbacks + +import "encoding/xml" + +// 自动生成的回调结构,按需修改, 生成方式: make callback doc=微信文档地址url +// 文档: https://developer.work.weixin.qq.com/document/path/97299#通过获客链接申请好友事件 + +func init() { + //添加可解析的回调事件 + supportCallback(EventCustomerAcquisitionFriendRequest{}) +} + +type EventCustomerAcquisitionFriendRequest struct { + XMLName xml.Name `xml:"xml"` + Text string `xml:",chardata"` + ToUserName struct { + Text string `xml:",chardata"` + } `xml:"ToUserName"` + FromUserName struct { + Text string `xml:",chardata"` + } `xml:"FromUserName"` + CreateTime struct { + Text string `xml:",chardata"` + } `xml:"CreateTime"` + MsgType struct { + Text string `xml:",chardata"` + } `xml:"MsgType"` + Event struct { + Text string `xml:",chardata"` + } `xml:"Event"` + ChangeType struct { + Text string `xml:",chardata"` + } `xml:"ChangeType"` + LinkId struct { + Text string `xml:",chardata"` + } `xml:"LinkId"` + State struct { + Text string `xml:",chardata"` + } `xml:"State"` +} + +func (EventCustomerAcquisitionFriendRequest) GetMessageType() string { + return "event" +} + +func (EventCustomerAcquisitionFriendRequest) GetEventType() string { + return "customer_acquisition" +} + +func (EventCustomerAcquisitionFriendRequest) GetChangeType() string { + return "friend_request" +} + +func (m EventCustomerAcquisitionFriendRequest) GetTypeKey() string { + return m.GetMessageType() + ":" + m.GetEventType() + ":" + m.GetChangeType() +} + +func (EventCustomerAcquisitionFriendRequest) ParseFromXml(data []byte) (CallBackExtraInfoInterface, error) { + var temp EventCustomerAcquisitionFriendRequest + err := xml.Unmarshal(data, &temp) + return temp, err +}