-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(wecom): add customer service msg struct (#32)
Co-authored-by: Walle <walle@artisan-cloud.com>
- Loading branch information
Showing
6 changed files
with
121 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 15 additions & 7 deletions
22
src/work/accountService/customer/request/requestUpgradeService.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
package request | ||
|
||
import "github.com/ArtisanCloud/power-wechat/src/kernel/power" | ||
|
||
type RequestUpgradeService struct { | ||
OpenKFID string `json:"open_kfid"` | ||
ExternalUserID string `json:"external_userid"` | ||
Type int `json:"type"` | ||
Member *power.StringMap `json:"member"` | ||
GroupChat *power.StringMap `json:"groupchat"` | ||
OpenKFID string `json:"open_kfid"` | ||
ExternalUserID string `json:"external_userid"` | ||
Type int `json:"type"` | ||
Member *RequestUpgradeServiceMember `json:"member,omitempty"` | ||
GroupChat *RequestUpgradeServiceGroupChat `json:"groupchat,omitempty"` | ||
} | ||
|
||
type RequestUpgradeServiceMember struct { | ||
UserID string `json:"userid"` | ||
Wording string `json:"wording"` | ||
} | ||
|
||
type RequestUpgradeServiceGroupChat struct { | ||
ChatID string `json:"chat_id"` | ||
Wording string `json:"wording"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
src/work/accountService/message/request/requestAccountServiceSendMsg.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
package request | ||
|
||
type RequestAccountServiceSendMsg struct { | ||
ToUser string `json:"touser"` | ||
OpenKfid string `json:"open_kfid"` | ||
MsgID string `json:"msgid"` | ||
MsgType string `json:"msgtype"` | ||
Text RequestAccountServiceMsgText `json:"text,omitempty"` | ||
Image RequestAccountServiceMsgImage `json:"image,omitempty"` | ||
Voice RequestAccountServiceMsgVoice `json:"voice,omitempty"` | ||
File RequestAccountServiceMsgFile `json:"file,omitempty"` | ||
Link RequestAccountServiceMsgLink `json:"link,omitempty"` | ||
MiniProgram RequestAccountServiceMsgMiniProgram `json:"miniprogram,omitempty"` | ||
Menu RequestAccountServiceMsgMenu `json:"msgmenu,omitempty"` | ||
Location RequestAccountServiceMsgLocation `json:"location,omitempty"` | ||
} | ||
|
||
type RequestAccountServiceMsgText struct { | ||
Content string `json:"content"` | ||
} | ||
|
||
type RequestAccountServiceMsgImage struct { | ||
MediaID string `json:"media_id"` | ||
} | ||
|
||
type RequestAccountServiceMsgVoice struct { | ||
MediaID string `json:"media_id"` | ||
} | ||
|
||
type RequestAccountServiceMsgFile struct { | ||
MediaID string `json:"media_id"` | ||
} | ||
|
||
type RequestAccountServiceMsgLink struct { | ||
Title string `json:"title"` | ||
Desc string `json:"desc"` | ||
Url string `json:"url"` | ||
ThumbMediaId string `json:"thumb_media_id"` | ||
} | ||
|
||
type RequestAccountServiceMsgMiniProgram struct { | ||
AppId string `json:"appid"` | ||
Title string `json:"title"` | ||
ThumbMediaID string `json:"thumb_media_id"` | ||
PagePath string `json:"pagepath"` | ||
} | ||
|
||
type RequestAccountServiceMsgMenu struct { | ||
HeadContent string `json:"head_content"` | ||
TailContent string `json:"tail_content,omitempty"` | ||
List []RequestAccountServiceMsgMenuList `json:"list,omitempty"` | ||
} | ||
type RequestAccountServiceMsgMenuList struct { | ||
Click RequestAccountServiceMsgMenuListClick `json:"click,omitempty"` | ||
View RequestAccountServiceMsgMenuListView `json:"view,omitempty"` | ||
MiniProgram RequestAccountServiceMsgMenuListMiniProgram `json:"miniprogram,omitempty"` | ||
} | ||
type RequestAccountServiceMsgMenuListClick struct { | ||
ID string `json:"id"` | ||
Content string `json:"content"` | ||
} | ||
type RequestAccountServiceMsgMenuListView struct { | ||
Url string `json:"url"` | ||
Content string `json:"content"` | ||
} | ||
type RequestAccountServiceMsgMenuListMiniProgram struct { | ||
AppID string `json:"appid"` | ||
PagePath string `json:"pagepath"` | ||
Content string `json:"content"` | ||
} | ||
|
||
type RequestAccountServiceMsgLocation struct { | ||
Name string `json:"name"` | ||
Address string `json:"address"` | ||
Latitude int `json:"latitude"` | ||
Longitude int `json:"longitude"` | ||
} |
9 changes: 9 additions & 0 deletions
9
src/work/accountService/message/request/requestAccountServiceSendMsgOnEvent.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package request | ||
|
||
type RequestAccountServiceSendMsgOnEvent struct { | ||
Code string `json:"code"` | ||
MsgID string `json:"msgid"` | ||
MsgType string `json:"msgtype"` | ||
Text RequestAccountServiceMsgText `json:"text,omitempty"` | ||
Menu RequestAccountServiceMsgMenu `json:"msgmenu,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters