batch_msg.api 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. Labels []string `json:"labels,optional"`
  31. // 标签列表
  32. Type *int32 `json:"type,optional"`
  33. }
  34. // The response data of batch msg list | BatchMsg列表数据
  35. BatchMsgListResp {
  36. BaseDataInfo
  37. // BatchMsg list data | BatchMsg列表数据
  38. Data BatchMsgListInfo `json:"data"`
  39. }
  40. // BatchMsg list data | BatchMsg列表数据
  41. BatchMsgListInfo {
  42. BaseListInfo
  43. // The API list data | BatchMsg列表数据
  44. Data []BatchMsgInfo `json:"data"`
  45. }
  46. // Get batch msg list request params | BatchMsg列表请求参数
  47. BatchMsgListReq {
  48. PageInfo
  49. // 批次号
  50. BatchNo *string `json:"batchNo,optional"`
  51. // 发送方微信ID
  52. Fromwxid *string `json:"fromwxid,optional"`
  53. // 内容
  54. Msg *string `json:"msg,optional"`
  55. // 任务名称
  56. TaskName *string `json:"taskName,optional"`
  57. // 群发类型
  58. Type *int32 `json:"type"`
  59. }
  60. // BatchMsg information response | BatchMsg信息返回体
  61. BatchMsgInfoResp {
  62. BaseDataInfo
  63. // BatchMsg information | BatchMsg数据
  64. Data BatchMsgInfo `json:"data"`
  65. }
  66. )
  67. @server(
  68. jwt: Auth
  69. group: batch_msg
  70. middleware: Authority
  71. )
  72. service Wechat {
  73. // Create batch msg information | 创建BatchMsg
  74. @handler createBatchMsg
  75. post /batch_msg/create (BatchMsgInfo) returns (BaseMsgResp)
  76. // Update batch msg information | 更新BatchMsg
  77. @handler updateBatchMsg
  78. post /batch_msg/update (BatchMsgInfo) returns (BaseMsgResp)
  79. // Delete batch msg information | 删除BatchMsg信息
  80. @handler deleteBatchMsg
  81. post /batch_msg/delete (IDsReq) returns (BaseMsgResp)
  82. // Get batch msg list | 获取BatchMsg列表
  83. @handler getBatchMsgList
  84. post /batch_msg/list (BatchMsgListReq) returns (BatchMsgListResp)
  85. // Get batch msg by ID | 通过ID获取BatchMsg
  86. @handler getBatchMsgById
  87. post /batch_msg (IDReq) returns (BatchMsgInfoResp)
  88. // Stop batch_msg by ID | 通过ID停止BatchMsg
  89. @handler stopBatchMsg
  90. post /batch_msg/stop (IDReq) returns (BaseMsgResp)
  91. }