389 lines
13 KiB
Go
389 lines
13 KiB
Go
package baseinfo
|
|
|
|
// 企业红包(自己发的)
|
|
/**
|
|
<sysmsg type="paymsg">
|
|
<paymsg>
|
|
<PayMsgType>14</PayMsgType>
|
|
<appmsgcontent><![CDATA[
|
|
%3Cmsg%3E%0A%3Cappmsg+appid%3D%22%22+sdkver%3D%22%22%3E%0A%3Cdes%3E%3C!%5BCDATA%5B%E6%88%91%E7%BB%99%E4%BD%A0%E5%8F%91%E4%BA%86%E4%B8%80%E4%B8%AA%E7%BA%A2%E5%8C%85%EF%BC%8C%E8%B5%B6%E7%B4%A7%E5%8E%BB%E6%8B%86!%5D%5D%3E%3C%2Fdes%3E%0A%3Curl%3E%3C!%5BCDATA%5Bhttps%3A%2F%2Fwxapp.tenpay.com%2Fmmpayhb%2Fwxhb_personalreceive%3Fshowwxpaytitle%3D1%26msgtype%3D1%26channelid%3D1%26sendid%3D1800008896202411117095715085001%5D%5D%3E%3C%2Furl%3E%0A%3Clowurl%3E%3C!%5BCDATA%5B%5D%5D%3E%3C%2Flowurl%3E%0A%3Ctype%3E%3C!%5BCDATA%5B2001%5D%5D%3E%3C%2Ftype%3E%0A%3Ctitle%3E%3C!%5BCDATA%5B%E5%BE%AE%E4%BF%A1%E7%BA%A2%E5%8C%85%5D%5D%3E%3C%2Ftitle%3E%0A%3Cthumburl%3E%3C!%5BCDATA%5B%5D%5D%3E%3C%2Fthumburl%3E%0A%0A%3Cwcpayinfo%3E%0A%3Ctemplateid%3E%3C!%5BCDATA%5B7a2a165d31da7fce6dd77e05c300028a%5D%5D%3E%3C%2Ftemplateid%3E%0A%3Curl%3E%3C!%5BCDATA%5Bhttps%3A%2F%2Fwxapp.tenpay.com%2Fmmpayhb%2Fwxhb_personalreceive%3Fshowwxpaytitle%3D1%26msgtype%3D1%26channelid%3D1%26sendid%3D1800008896202411117095715085001%5D%5D%3E%3C%2Furl%3E%0A%3Ciconurl%3E%3C!%5BCDATA%5Bhttps%3A%2F%2Fwx.gtimg.com%2Fhongbao%2F1800%2Fhb.png%5D%5D%3E%3C%2Ficonurl%3E%0A%3Creceivertitle%3E%3C!%5BCDATA%5B%E6%81%AD%E5%96%9C%E5%8F%91%E8%B4%A2%EF%BC%8C%E5%A4%A7%E5%90%89%E5%A4%A7%E5%88%A9%5D%5D%3E%3C%2Freceivertitle%3E%0A%3Csendertitle%3E%3C!%5BCDATA%5B%E6%81%AD%E5%96%9C%E5%8F%91%E8%B4%A2%EF%BC%8C%E5%A4%A7%E5%90%89%E5%A4%A7%E5%88%A9%5D%5D%3E%3C%2Fsendertitle%3E%0A%3Cscenetext%3E%3C!%5BCDATA%5B%E5%BE%AE%E4%BF%A1%E7%BA%A2%E5%8C%85%5D%5D%3E%3C%2Fscenetext%3E%0A%3Csenderdes%3E%3C!%5BCDATA%5B%E6%9F%A5%E7%9C%8B%E7%BA%A2%E5%8C%85%5D%5D%3E%3C%2Fsenderdes%3E%0A%3Creceiverdes%3E%3C!%5BCDATA%5B%E9%A2%86%E5%8F%96%E7%BA%A2%E5%8C%85%5D%5D%3E%3C%2Freceiverdes%3E%0A%3Cnativeurl%3E%3C!%5BCDATA%5Bwxpay%3A%2F%2Fc2cbizmessagehandler%2Fhongbao%2Freceivehongbao%3Fmsgtype%3D1%26channelid%3D1%26sendid%3D1800008896202411117095715085001%26ver%3D2%26sign%3D%7B%7BSIGN%7D%7D%5D%5D%3E%3C%2Fnativeurl%3E%0A%3Csceneid%3E%3C!%5BCDATA%5B1005%5D%5D%3E%3C%2Fsceneid%3E%0A%3Cinnertype%3E%3C!%5BCDATA%5B0%5D%5D%3E%3C%2Finnertype%3E%0A%0A%0A%3Cscenetext%3E%E5%BE%AE%E4%BF%A1%E7%BA%A2%E5%8C%85%3C%2Fscenetext%3E%0A%0A%0A%0A%0A%0A%3Clocallogoicon%3E%3C!%5BCDATA%5Bc2c_hongbao_icon_cn%5D%5D%3E%3C%2Flocallogoicon%3E%0A%0A%3Cinvalidtime%3E%3C!%5BCDATA%5B1731421955%5D%5D%3E%3C%2Finvalidtime%3E%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%3Cbroaden%3E%0A%0A%0A%0A%0A%0A%3C%2Fbroaden%3E%0A%0A%0A%0A%3C%2Fwcpayinfo%3E%0A%0A%0A%0A%3C%2Fappmsg%3E%0A%3Cfromusername%3E%3C!%5BCDATA%5Bxyuh111%5D%5D%3E%3C%2Ffromusername%3E%0A%3C%2Fmsg%3E
|
|
]]></appmsgcontent>
|
|
<fromusername><![CDATA[xyuh111]]></fromusername>
|
|
<tousername><![CDATA[47296903317@chatroom]]></tousername>
|
|
</paymsg>
|
|
</sysmsg>
|
|
*/
|
|
type RedSysMsg struct {
|
|
Paymsg PayMsg `xml:"paymsg"`
|
|
}
|
|
type PayMsg struct {
|
|
PayMsgType uint32 `xml:"paymsgtype"`
|
|
AppMsgContent string `xml:"appmsgcontent"`
|
|
FromUserName string `xml:"fromusername"`
|
|
ToUserName string `xml:"tousername"`
|
|
}
|
|
|
|
// Msg Msg
|
|
type Msg struct {
|
|
APPMsg APPMsg `xml:"appmsg"`
|
|
FromUserName string `xml:"fromusername"`
|
|
}
|
|
|
|
// 转账
|
|
type Msg2 struct {
|
|
APPMsg APPMsg2 `xml:"appmsg"`
|
|
}
|
|
|
|
// APPMsg APPMsg
|
|
type APPMsg struct {
|
|
Des string `xml:"des"`
|
|
URL string `xml:"url"`
|
|
MsgType uint32 `xml:"type"`
|
|
Title string `xml:"title"`
|
|
ThumbURL string `xml:"thumburl"`
|
|
WCPayInfo WCPayInfo `xml:"wcpayinfo"`
|
|
}
|
|
|
|
// 转账
|
|
type APPMsg2 struct {
|
|
Des string `xml:"des"`
|
|
URL string `xml:"url"`
|
|
MsgType uint32 `xml:"type"`
|
|
Title string `xml:"title"`
|
|
ThumbURL string `xml:"thumburl"`
|
|
WCPayInfo WCPayInfo2 `xml:"wcpayinfo"`
|
|
}
|
|
|
|
// WCPayInfo WCPayInfo
|
|
type WCPayInfo struct {
|
|
TemplatedID string `xml:"templatedid"`
|
|
URL string `xml:"url"`
|
|
IconURL string `xml:"iconurl"`
|
|
ReceiverTitle string `xml:"receivertitle"`
|
|
SenderTitle string `xml:"sendertitle"`
|
|
SenderDes string `xml:"senderdes"`
|
|
ReceiverDes string `xml:"receiverdes"`
|
|
NativeURL string `xml:"nativeurl"`
|
|
SceneID uint32 `xml:"sceneid"`
|
|
InnerType string `xml:"innertype"`
|
|
PayMsgID string `xml:"paymsgid"`
|
|
SceneText string `xml:"scenetext"`
|
|
LocalLogoIcon string `xml:"locallogoicon"`
|
|
InvalidTime uint32 `xml:"invalidtime"`
|
|
Broaden string `xml:"broaden"`
|
|
}
|
|
|
|
/*
|
|
*
|
|
|
|
"InvalidTime": "1730608788",
|
|
"ToUserName": "xyuh111",
|
|
"TransFerId": "1000050001202411021422875786033",
|
|
"TransactionId": "53010001009074202411020607319513"
|
|
payer_username
|
|
*/
|
|
type WCPayInfo2 struct {
|
|
Feedesc string `xml:"feedesc"`
|
|
TransactionId string `xml:"transcationid"`
|
|
ToUserName string `xml:"receiver_username"`
|
|
FromUserName string `xml:"payer_username"` //私聊为空,群聊有值
|
|
FromGroupId string `xml:"payer"` // 乱写的,没有这个字段
|
|
InvalidTime string `xml:"invalidtime"`
|
|
TransFerId string `xml:"transferid"`
|
|
}
|
|
|
|
// HongBaoURLItem 红包NativeURL项
|
|
type HongBaoURLItem struct {
|
|
SendUserName string
|
|
ShowWxPayTitle string
|
|
MsgType string
|
|
ChannelID string
|
|
SendID string
|
|
Ver string
|
|
Sign string
|
|
ShowSourceMac string
|
|
SceneID uint32
|
|
}
|
|
|
|
// HongBaoReceiverItem 接收红包项
|
|
type HongBaoReceiverItem struct {
|
|
CgiCmd uint32
|
|
Province string
|
|
City string
|
|
InWay uint32
|
|
SceneID uint32
|
|
NativeURL string
|
|
HongBaoURLItem *HongBaoURLItem
|
|
}
|
|
|
|
// HongBaoOpenItem 领取红包项
|
|
type HongBaoOpenItem struct {
|
|
CgiCmd uint32
|
|
SceneID uint32
|
|
Province string
|
|
City string
|
|
HeadImg string
|
|
NativeURL string
|
|
NickName string
|
|
SessionUserName string
|
|
TimingIdentifier string
|
|
Offset int64
|
|
Limit int64
|
|
HongBaoURLItem *HongBaoURLItem
|
|
}
|
|
|
|
// HongBaoQryDetailItem 查询红包领取详情
|
|
type HongBaoQryDetailItem struct {
|
|
CgiCmd uint32
|
|
Province string
|
|
City string
|
|
NativeURL string
|
|
HongBaoURLItem *HongBaoURLItem
|
|
}
|
|
|
|
// HongBaoQryListItem 查询领取的红包列表信息
|
|
type HongBaoQryListItem struct {
|
|
CgiCmd uint32
|
|
Province string
|
|
City string
|
|
Offset uint32
|
|
Limit uint32
|
|
}
|
|
|
|
// SourceObject SourceObject
|
|
type SourceObject struct {
|
|
CoverImage string
|
|
CoverImageMd5 string
|
|
DetailImage string
|
|
DetailImageMd5 string
|
|
}
|
|
|
|
// ShowSourceRec ShowSourceRec
|
|
type ShowSourceRec struct {
|
|
SubType uint32
|
|
SourceObject SourceObject
|
|
}
|
|
|
|
// HongBaoReceiverResp 接收红包响应项
|
|
type HongBaoReceiverResp struct {
|
|
RetCode uint32
|
|
RetMsg string
|
|
SendID string
|
|
Wishing string
|
|
IsSender uint32
|
|
ReceiveStatus uint32
|
|
HBStatus uint32
|
|
StatusMess string
|
|
HBType uint32
|
|
WaterMark string
|
|
ScenePicSwitch uint32
|
|
PreStrainFlag uint32
|
|
SendUserName string
|
|
TimingIdentifier string
|
|
ShowSourceRec ShowSourceRec
|
|
ShowYearExpression uint32
|
|
ExpressionMd5 string
|
|
ShowRecNormalExpression uint32
|
|
}
|
|
|
|
// RecordItem 领取红包记录
|
|
type RecordItem struct {
|
|
ReceiveAmount uint32
|
|
ReceiveTime string
|
|
Answer string
|
|
ReceiveID string
|
|
State uint32
|
|
ReceiveOpenID string
|
|
UserName string
|
|
}
|
|
|
|
// RealnameInfo RealnameInfo
|
|
type RealnameInfo struct {
|
|
GuideFlag uint32
|
|
}
|
|
|
|
// Operation Operation
|
|
type Operation struct {
|
|
Name string
|
|
Type string
|
|
Content string
|
|
Enable uint32
|
|
IconURL string
|
|
OssKey uint32
|
|
}
|
|
|
|
// ShowSourceOpen ShowSourceOpen
|
|
type ShowSourceOpen struct {
|
|
Source ShowSourceRec
|
|
Operation Operation
|
|
}
|
|
|
|
// HongBaoOpenResp 打开红包响应项
|
|
type HongBaoOpenResp struct {
|
|
RetCode uint32
|
|
RetMsg string
|
|
SendID string
|
|
Amount uint32
|
|
RecNum uint32
|
|
RecAmount uint32
|
|
TotalNum uint32
|
|
HasWriteAnswer uint32
|
|
HBType uint32
|
|
IsSender uint32
|
|
IsContinue uint32
|
|
ReceiveStatus uint32
|
|
HBStatus uint32
|
|
StatusMess string
|
|
Wishing string
|
|
ReceiveID string
|
|
HeadTitle string
|
|
CanShare uint32
|
|
OperationHeader []string
|
|
Record []RecordItem
|
|
WaterMark string
|
|
JumpChange uint32
|
|
ChangeWording string
|
|
SendUserName string
|
|
RealnameInfo RealnameInfo
|
|
SystemMsgContext string
|
|
SessionUserName string
|
|
JumpChangeType uint32
|
|
ChangeIconURL string
|
|
ShowSourceOpen ShowSourceOpen
|
|
ExpressionMd5 string
|
|
ExpressionType uint32
|
|
ShowYearExpression uint32
|
|
ShowOpenNormalExpression uint32
|
|
EnableAnswerByExpression uint32
|
|
EnableAnswerBySelfie uint32
|
|
}
|
|
|
|
// OperationTail OperationTail
|
|
type OperationTail struct {
|
|
Enable uint32
|
|
}
|
|
|
|
// AtomicFunc AtomicFunc
|
|
type AtomicFunc struct {
|
|
Enable uint32
|
|
}
|
|
|
|
// HongBaoQryDetailResp 红包领取详情响应
|
|
type HongBaoQryDetailResp struct {
|
|
RetCode uint32
|
|
RetMsg string
|
|
RecNum uint32
|
|
TotalNum uint32
|
|
TotalAmount uint32
|
|
SendID string
|
|
Amount uint32
|
|
Wishing string
|
|
IsSender uint32
|
|
ReceiveID string
|
|
HasWriteAnswer uint32
|
|
OperationHeader []string
|
|
HBType uint32
|
|
IsContinue uint32
|
|
HBStatus uint32
|
|
ReceiveStatus uint32
|
|
StatusMess string
|
|
HeadTitle string
|
|
CanShare uint32
|
|
HBKind uint32
|
|
RecAmount uint32
|
|
Record []RecordItem
|
|
OperationTail OperationTail
|
|
AtomicFunc AtomicFunc
|
|
JumpChange uint32
|
|
ChangeWording string
|
|
SendUserName string
|
|
ChangeURL string
|
|
JumpChangeType uint32
|
|
ShowSourceOpen ShowSourceOpen
|
|
ExpressionMd5 string
|
|
ShowDetailNormalExpression uint32
|
|
EnableAnswerByExpression uint32
|
|
EnableAnswerBySelfie uint32
|
|
}
|
|
|
|
// QryRecordItem 领取过的红包项
|
|
type QryRecordItem struct {
|
|
SendName string
|
|
ReceiveAmount uint32
|
|
ReceiveTime string
|
|
HBType uint32
|
|
SendID string
|
|
HBKind uint32
|
|
SendUserName string
|
|
ReceiveID string
|
|
}
|
|
|
|
// HongBaoQryListResp 查询领取的红包记录
|
|
type HongBaoQryListResp struct {
|
|
RetCode uint32
|
|
RetMsg string
|
|
RecTotalNum uint32
|
|
RecTotalAmount uint32
|
|
Years string
|
|
GameCount uint32
|
|
RecordYear string
|
|
IsContinue uint32
|
|
Record []QryRecordItem
|
|
}
|
|
|
|
type RedPacket struct {
|
|
RedType uint32 // 红包类型(0 普通红包; 1 拼手气红包; ? 专属红包)
|
|
Username string // 红包接收者; wxid 或 群ID
|
|
From uint32 // InAway(0:群红包; 1:个人红包)
|
|
Count uint32 // 红包个数(最少为1)
|
|
Amount uint32 // 每个红包的金额(单位为分, 最小为100); 总金额为 Amount*Count
|
|
Content string // 红包的备注内容(祝福语)
|
|
}
|
|
|
|
// HongBaoItem 红包项
|
|
type HongBaoItem struct {
|
|
IsGroup uint32 // 默认 1
|
|
SceneID uint32
|
|
NativeURL string
|
|
Limit int64
|
|
URLItem *HongBaoURLItem
|
|
FromUserName string
|
|
RecvAtMs int64
|
|
EnqueueAtMs int64
|
|
DequeueAtMs int64
|
|
}
|
|
|
|
// 转账项
|
|
// <paysubtype>1</paysubtype>
|
|
// <feedesc><![CDATA[¥1.00]]></feedesc>
|
|
// <transcationid><![CDATA[53010001009074202411020607319513]]></transcationid>
|
|
// <transferid><![CDATA[1000050001202411021422875786033]]></transferid>
|
|
// <invalidtime><![CDATA[1730608788]]></invalidtime>
|
|
// <begintransfertime><![CDATA[1730522388]]></begintransfertime>
|
|
// <effectivedate><![CDATA[1]]></effectivedate>
|
|
// <pay_memo><![CDATA[]]></pay_memo>
|
|
// <receiver_username><![CDATA[xyuh111]]></receiver_username>
|
|
// <payer_username><![CDATA[]]></payer_username>
|
|
type TransferItem struct {
|
|
}
|
|
|
|
type GetRedPacketList struct {
|
|
Offset int64
|
|
Limit int64
|
|
NativeURL string
|
|
HongBaoItem HongBaoURLItem
|
|
}
|
|
|
|
// PreTransferResp PreTransferResp
|
|
type PreTransferResp struct {
|
|
ReqKey string `json:"req_key"`
|
|
TansferingStatus string `json:"tansfering_status"`
|
|
RetCode string `json:"retcode"`
|
|
RetMsg string `json:"retmsg"`
|
|
//AppMsgContent string `json:"appmsgcontent"`
|
|
ReceiverTrueName string `json:"receiver_true_name"`
|
|
TransferId string `json:"transfer_id"`
|
|
TransactionId string `json:"transaction_id"`
|
|
Fee uint `json:"fee"`
|
|
}
|