Skip to content

Commit 93ede19

Browse files
author
Matrix-X
committed
update(work): ApprovalInfo new fields
1 parent c9cf587 commit 93ede19

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

src/work/server/handlers/models/event.go

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,14 @@ type Comments struct {
207207
}
208208

209209
type ApprovalNode struct {
210-
NodeStatus int `xml:"NodeStatus" json:"NodeStatus"`
211-
NodeAttr int `xml:"NodeAttr" json:"NodeAttr"`
212-
NodeType int `xml:"NodeType" json:"NodeType"`
213-
ApprovalItems []ApprovalItems `xml:"Items" json:"Items"`
210+
NodeStatus int `xml:"NodeStatus" json:"NodeStatus"`
211+
NodeAttr int `xml:"NodeAttr" json:"NodeAttr"`
212+
NodeType int `xml:"NodeType" json:"NodeType"`
213+
ApprovalItems ApprovalItems `xml:"Items" json:"Items"`
214214
}
215215

216216
type ApprovalItems struct {
217-
ApprovalItem []ApprovalItem `xml:"ApprovalNode" json:"ApprovalNode"`
217+
ApprovalItem []ApprovalItem `xml:"Item" json:"Item"`
218218
}
219219

220220
type ApprovalItem struct {
@@ -227,7 +227,7 @@ type ApprovalItem struct {
227227
}
228228

229229
type NotifyNodes struct {
230-
NotifyNode NotifyNode `xml:"NotifyNode" json:"NotifyNode"`
230+
NotifyNode []NotifyNode `xml:"NotifyNode" json:"NotifyNode"`
231231
}
232232

233233
type NotifyNode struct {
@@ -236,6 +236,10 @@ type NotifyNode struct {
236236
ItemImage string `xml:"ItemImage" json:"ItemImage"`
237237
}
238238

239+
type ApprovalNodes struct {
240+
ApprovalNode []ApprovalNode `xml:"ApprovalNode" json:"ApprovalNode"`
241+
}
242+
239243
type ApprovalInfo struct {
240244
Text string `xml:",chardata" json:",chardata"`
241245
SpNO string `xml:"SpNo" json:"SpNo"`
@@ -251,17 +255,17 @@ type ApprovalInfo struct {
251255

252256
// new fields
253257
// https://developer.work.weixin.qq.com/document/path/90240#%E5%AE%A1%E6%89%B9%E7%8A%B6%E6%80%81%E9%80%9A%E7%9F%A5%E4%BA%8B%E4%BB%B6
254-
ThirdNo string `xml:"ThirdNo" json:"ThirdNo"`
255-
OpenSpName string `xml:"OpenSpName" json:"OpenSpName"`
256-
OpenTemplateId string `xml:"OpenTemplateId" json:"OpenTemplateId"`
257-
OpenSpStatus int `xml:"OpenSpStatus" json:"OpenSpStatus"`
258-
ApplyUserName string `xml:"ApplyUserName" json:"ApplyUserName"`
259-
ApplyUserId string `xml:"ApplyUserId" json:"ApplyUserId"`
260-
ApplyUserParty string `xml:"ApplyUserParty" json:"ApplyUserParty"`
261-
ApplyUserImage string `xml:"ApplyUserImage" json:"ApplyUserImage"`
262-
ApprovalNodes []ApprovalNode `xml:"ApprovalNodes" json:"ApprovalNodes"`
263-
NotifyNodes []NotifyNode `xml:"NotifyNodes" json:"NotifyNodes"`
264-
ApproverStep int `xml:"approverstep" json:"approverstep"`
258+
ThirdNo string `xml:"ThirdNo" json:"ThirdNo"`
259+
OpenSpName string `xml:"OpenSpName" json:"OpenSpName"`
260+
OpenTemplateId string `xml:"OpenTemplateId" json:"OpenTemplateId"`
261+
OpenSpStatus int `xml:"OpenSpStatus" json:"OpenSpStatus"`
262+
ApplyUserName string `xml:"ApplyUserName" json:"ApplyUserName"`
263+
ApplyUserId string `xml:"ApplyUserId" json:"ApplyUserId"`
264+
ApplyUserParty string `xml:"ApplyUserParty" json:"ApplyUserParty"`
265+
ApplyUserImage string `xml:"ApplyUserImage" json:"ApplyUserImage"`
266+
ApprovalNodes ApprovalNodes `xml:"ApprovalNodes" json:"ApprovalNodes"`
267+
NotifyNodes NotifyNodes `xml:"NotifyNodes" json:"NotifyNodes"`
268+
ApproverStep int `xml:"approverstep" json:"approverstep"`
265269
}
266270

267271
type EventOpenApprovalChange struct {

0 commit comments

Comments
 (0)