123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212 |
- import "../base.api"
- type (
- // The data of batch msg information | BatchMsg信息
- BatchMsgInfo {
- BaseIDInfo
- // 状态 0 未开始 1 开始发送 2 发送完成 3 发送中止
- Status *uint8 `json:"status,optional"`
- // 批次号
- BatchNo *string `json:"batchNo,optional"`
- // 任务名称
- TaskName *string `json:"taskName,optional"`
- // 发送方微信ID
- Fromwxid *string `json:"fromwxid,optional"`
- // 内容
- Msg *string `json:"msg,optional"`
- // 发送规则 all 全部 tag1,tag2 按tag发送
- Tag *string `json:"tag,optional"`
- // 总数
- Total *int32 `json:"total,optional"`
- // 成功数量
- Success *int32 `json:"success,optional"`
- // 失败数量
- Fail *int32 `json:"fail,optional"`
- // 开始时间
- StartTime *int64 `json:"startTime,optional"`
- StartTimeStr *string `json:"startTimeStr,optional"`
- // 结束时间
- StopTime *int64 `json:"stopTime,optional"`
- // 发送时间
- SendTime *int64 `json:"sendTime,optional"`
- // 标签列表
- Labels []uint64 `json:"labels,optional"`
- GroupLabels []uint64 `json:"groupLabels,optional"`
- // 标签列表
- Type *int32 `json:"type,optional"`
- // 内容类型:1-微信 2-whatsapp
- Ctype *uint64 `json:"ctype,optional"`
- Cc *string `json:"cc,optional"`
- Phone *string `json:"phone,optional"`
- TemplateCode *string `json:"templateCode,optional"`
- TemplateName *string `json:"templateName,optional"`
- Lang *string `json:"lang,optional"`
- }
- // The response data of batch msg list | BatchMsg列表数据
- BatchMsgListResp {
- BaseDataInfo
- // BatchMsg list data | BatchMsg列表数据
- Data BatchMsgListInfo `json:"data"`
- }
- // BatchMsg list data | BatchMsg列表数据
- BatchMsgListInfo {
- BaseListInfo
- // The API list data | BatchMsg列表数据
- Data []BatchMsgInfo `json:"data"`
- }
- // Get batch msg list request params | BatchMsg列表请求参数
- BatchMsgListReq {
- PageInfo
- // 批次号
- BatchNo *string `json:"batchNo,optional"`
- // 发送方微信ID
- Fromwxid *string `json:"fromwxid,optional"`
- // 内容
- Msg *string `json:"msg,optional"`
- // 任务名称
- TaskName *string `json:"taskName,optional"`
- // 群发类型
- Type *int32 `json:"type"`
- }
- // BatchMsg information response | BatchMsg信息返回体
- BatchMsgInfoResp {
- BaseDataInfo
- // BatchMsg information | BatchMsg数据
- Data BatchMsgInfo `json:"data"`
- }
- WhatsappBatchMsgListReq {
- PageInfo
- // 批次号
- BatchNo *string `json:"batchNo,optional"`
- // 发送方微信ID
- Phone *string `json:"phone,optional"`
- // 内容
- Msg *string `json:"msg,optional"`
- }
- WhatsappBatchMsgHistoryReq {
- PageInfo
- IDReq
- Status *uint8 `json:"status,optional"`
- Phone *string `json:"phone,optional"`
- }
- WhatsappBatchMsgHistoryResp {
- BaseDataInfo
- Data HistoryListInfo `json:"data"`
- }
- HistoryListInfo {
- BaseListInfo
- Data []HistoryInfo `json:"data"`
- }
- HistoryInfo {
- Index *uint64 `json:"index,optional"`
- From *string `json:"from,optional"`
- To *string `json:"to,optional"`
- SendTime *int64 `json:"sendTime,optional"`
- BatchNo *string `json:"batchNo,optional"`
- Cc *string `json:"cc,optional"`
- Phone *string `json:"phone,optional"`
- Status *uint8 `json:"status,optional"`
- }
- SendMsgReq {
- Phone *string `json:"phone"`
- To *string `json:"to"`
- Lang *string `json:"lang"`
- TemplateCode *string `json:"templateCode"`
- }
- )
- @server(
- jwt: Auth
- group: batch_msg
- middleware: Authority
- )
- service Wechat {
- // Create batch msg information | 创建BatchMsg
- @handler createBatchMsg
- post /batch_msg/create (BatchMsgInfo) returns (BaseMsgResp)
- // Update batch msg information | 更新BatchMsg
- @handler updateBatchMsg
- post /batch_msg/update (BatchMsgInfo) returns (BaseMsgResp)
- // Delete batch msg information | 删除BatchMsg信息
- @handler deleteBatchMsg
- post /batch_msg/delete (IDsReq) returns (BaseMsgResp)
- // Get batch msg list | 获取BatchMsg列表
- @handler getBatchMsgList
- post /batch_msg/list (BatchMsgListReq) returns (BatchMsgListResp)
- // Get batch msg by ID | 通过ID获取BatchMsg
- @handler getBatchMsgById
- post /batch_msg (IDReq) returns (BatchMsgInfoResp)
- // Stop batch_msg by ID | 通过ID停止BatchMsg
- @handler stopBatchMsg
- post /batch_msg/stop (IDReq) returns (BaseMsgResp)
- // 获取Whatsapp 批量任务列表
- @handler getWhatcappBatchMsgList
- post /batch_msg/getWhatcappBatchMsgList (WhatsappBatchMsgListReq) returns (BatchMsgListResp)
- // 创建Whatsapp 群发任务
- @handler createWhatcappBatchMsg
- post /batch_msg/createWhatcappBatchMsg (BatchMsgInfo) returns (BaseMsgResp)
- // 修改Whatsapp 群发任务
- @handler updateWhatcappBatchMsg
- post /batch_msg/updateWhatcappBatchMsg (BatchMsgInfo) returns (BaseMsgResp)
- // 获取Whatsapp 群发任务详情
- @handler getWhatcappBatchMsg
- post /batch_msg/getWhatcappBatchMsg (IDReq) returns (BatchMsgInfoResp)
- // 删除Whatsapp 群发任务
- @handler removeWhatcappBatchMsg
- post /batch_msg/removeWhatcappBatchMsg (IDsReq) returns (BaseMsgResp)
- // 获取Whatsapp 群发任务发送记录
- @handler getWhatcappBatchMsgHistory
- post /batch_msg/getWhatcappBatchMsgHistory (WhatsappBatchMsgHistoryReq) returns (WhatsappBatchMsgHistoryResp)
- // 发送消息
- @handler sendBatchMsgText
- post /batch_msg/sendBatchMsgText (SendMsgReq) returns (BaseMsgResp)
- }
|