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) }