batch_msg.api 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. import "../base.api"
  2. type (
  3. // The data of batch msg information | BatchMsg信息
  4. BatchMsgInfo {
  5. BaseIDInfo
  6. // 状态 0 未开始 1 开始发送 2 发送完成 3 发送中止
  7. Status *uint8 `json:"status,optional"`
  8. // 批次号
  9. BatchNo *string `json:"batchNo,optional"`
  10. // 任务名称
  11. TaskName *string `json:"taskName,optional"`
  12. // 发送方微信ID
  13. Fromwxid *string `json:"fromwxid,optional"`
  14. // 内容
  15. Msg *string `json:"msg,optional"`
  16. // 发送规则 all 全部 tag1,tag2 按tag发送
  17. Tag *string `json:"tag,optional"`
  18. // 总数
  19. Total *int32 `json:"total,optional"`
  20. // 成功数量
  21. Success *int32 `json:"success,optional"`
  22. // 失败数量
  23. Fail *int32 `json:"fail,optional"`
  24. // 开始时间
  25. StartTime *int64 `json:"startTime,optional"`
  26. StartTimeStr *string `json:"startTimeStr,optional"`
  27. // 结束时间
  28. StopTime *int64 `json:"stopTime,optional"`
  29. // 发送时间
  30. SendTime *int64 `json:"sendTime,optional"`
  31. // 标签列表
  32. Labels []uint64 `json:"labels,optional"`
  33. GroupLabels []uint64 `json:"groupLabels,optional"`
  34. // 标签列表
  35. Type *int32 `json:"type,optional"`
  36. }
  37. // The response data of batch msg list | BatchMsg列表数据
  38. BatchMsgListResp {
  39. BaseDataInfo
  40. // BatchMsg list data | BatchMsg列表数据
  41. Data BatchMsgListInfo `json:"data"`
  42. }
  43. // BatchMsg list data | BatchMsg列表数据
  44. BatchMsgListInfo {
  45. BaseListInfo
  46. // The API list data | BatchMsg列表数据
  47. Data []BatchMsgInfo `json:"data"`
  48. }
  49. // Get batch msg list request params | BatchMsg列表请求参数
  50. BatchMsgListReq {
  51. PageInfo
  52. // 批次号
  53. BatchNo *string `json:"batchNo,optional"`
  54. // 发送方微信ID
  55. Fromwxid *string `json:"fromwxid,optional"`
  56. // 内容
  57. Msg *string `json:"msg,optional"`
  58. // 任务名称
  59. TaskName *string `json:"taskName,optional"`
  60. // 群发类型
  61. Type *int32 `json:"type"`
  62. }
  63. // BatchMsg information response | BatchMsg信息返回体
  64. BatchMsgInfoResp {
  65. BaseDataInfo
  66. // BatchMsg information | BatchMsg数据
  67. Data BatchMsgInfo `json:"data"`
  68. }
  69. )
  70. @server(
  71. jwt: Auth
  72. group: batch_msg
  73. middleware: Authority
  74. )
  75. service Wechat {
  76. // Create batch msg information | 创建BatchMsg
  77. @handler createBatchMsg
  78. post /batch_msg/create (BatchMsgInfo) returns (BaseMsgResp)
  79. // Update batch msg information | 更新BatchMsg
  80. @handler updateBatchMsg
  81. post /batch_msg/update (BatchMsgInfo) returns (BaseMsgResp)
  82. // Delete batch msg information | 删除BatchMsg信息
  83. @handler deleteBatchMsg
  84. post /batch_msg/delete (IDsReq) returns (BaseMsgResp)
  85. // Get batch msg list | 获取BatchMsg列表
  86. @handler getBatchMsgList
  87. post /batch_msg/list (BatchMsgListReq) returns (BatchMsgListResp)
  88. // Get batch msg by ID | 通过ID获取BatchMsg
  89. @handler getBatchMsgById
  90. post /batch_msg (IDReq) returns (BatchMsgInfoResp)
  91. // Stop batch_msg by ID | 通过ID停止BatchMsg
  92. @handler stopBatchMsg
  93. post /batch_msg/stop (IDReq) returns (BaseMsgResp)
  94. }