batch_msg.api 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. // 发送方微信ID
  11. Fromwxid *string `json:"fromwxid,optional"`
  12. // 内容
  13. Msg *string `json:"msg,optional"`
  14. // 发送规则 all 全部 tag1,tag2 按tag发送
  15. Tag *string `json:"tag,optional"`
  16. // 总数
  17. Total *int32 `json:"total,optional"`
  18. // 成功数量
  19. Success *int32 `json:"success,optional"`
  20. // 失败数量
  21. Fail *int32 `json:"fail,optional"`
  22. // 开始时间
  23. StartTime *int64 `json:"startTime,optional"`
  24. // 结束时间
  25. StopTime *int64 `json:"stopTime,optional"`
  26. // 标签列表
  27. Labels []string `json:"labels,optional"`
  28. }
  29. // The response data of batch msg list | BatchMsg列表数据
  30. BatchMsgListResp {
  31. BaseDataInfo
  32. // BatchMsg list data | BatchMsg列表数据
  33. Data BatchMsgListInfo `json:"data"`
  34. }
  35. // BatchMsg list data | BatchMsg列表数据
  36. BatchMsgListInfo {
  37. BaseListInfo
  38. // The API list data | BatchMsg列表数据
  39. Data []BatchMsgInfo `json:"data"`
  40. }
  41. // Get batch msg list request params | BatchMsg列表请求参数
  42. BatchMsgListReq {
  43. PageInfo
  44. // 批次号
  45. BatchNo *string `json:"batchNo,optional"`
  46. // 发送方微信ID
  47. Fromwxid *string `json:"fromwxid,optional"`
  48. // 内容
  49. Msg *string `json:"msg,optional"`
  50. }
  51. // BatchMsg information response | BatchMsg信息返回体
  52. BatchMsgInfoResp {
  53. BaseDataInfo
  54. // BatchMsg information | BatchMsg数据
  55. Data BatchMsgInfo `json:"data"`
  56. }
  57. )
  58. @server(
  59. jwt: Auth
  60. group: batch_msg
  61. middleware: Authority
  62. )
  63. service Wechat {
  64. // Create batch msg information | 创建BatchMsg
  65. @handler createBatchMsg
  66. post /batch_msg/create (BatchMsgInfo) returns (BaseMsgResp)
  67. // Update batch msg information | 更新BatchMsg
  68. @handler updateBatchMsg
  69. post /batch_msg/update (BatchMsgInfo) returns (BaseMsgResp)
  70. // Delete batch msg information | 删除BatchMsg信息
  71. @handler deleteBatchMsg
  72. post /batch_msg/delete (IDsReq) returns (BaseMsgResp)
  73. // Get batch msg list | 获取BatchMsg列表
  74. @handler getBatchMsgList
  75. post /batch_msg/list (BatchMsgListReq) returns (BatchMsgListResp)
  76. // Get batch msg by ID | 通过ID获取BatchMsg
  77. @handler getBatchMsgById
  78. post /batch_msg (IDReq) returns (BatchMsgInfoResp)
  79. }