batch_msg.api 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. // The response data of batch msg list | BatchMsg列表数据
  28. BatchMsgListResp {
  29. BaseDataInfo
  30. // BatchMsg list data | BatchMsg列表数据
  31. Data BatchMsgListInfo `json:"data"`
  32. }
  33. // BatchMsg list data | BatchMsg列表数据
  34. BatchMsgListInfo {
  35. BaseListInfo
  36. // The API list data | BatchMsg列表数据
  37. Data []BatchMsgInfo `json:"data"`
  38. }
  39. // Get batch msg list request params | BatchMsg列表请求参数
  40. BatchMsgListReq {
  41. PageInfo
  42. // 批次号
  43. BatchNo *string `json:"batchNo,optional"`
  44. // 发送方微信ID
  45. Fromwxid *string `json:"fromwxid,optional"`
  46. // 内容
  47. Msg *string `json:"msg,optional"`
  48. }
  49. // BatchMsg information response | BatchMsg信息返回体
  50. BatchMsgInfoResp {
  51. BaseDataInfo
  52. // BatchMsg information | BatchMsg数据
  53. Data BatchMsgInfo `json:"data"`
  54. }
  55. )
  56. @server(
  57. jwt: Auth
  58. group: batch_msg
  59. middleware: Authority
  60. )
  61. service Wechat {
  62. // Create batch msg information | 创建BatchMsg
  63. @handler createBatchMsg
  64. post /batch_msg/create (BatchMsgInfo) returns (BaseMsgResp)
  65. // Update batch msg information | 更新BatchMsg
  66. @handler updateBatchMsg
  67. post /batch_msg/update (BatchMsgInfo) returns (BaseMsgResp)
  68. // Delete batch msg information | 删除BatchMsg信息
  69. @handler deleteBatchMsg
  70. post /batch_msg/delete (IDsReq) returns (BaseMsgResp)
  71. // Get batch msg list | 获取BatchMsg列表
  72. @handler getBatchMsgList
  73. post /batch_msg/list (BatchMsgListReq) returns (BatchMsgListResp)
  74. // Get batch msg by ID | 通过ID获取BatchMsg
  75. @handler getBatchMsgById
  76. post /batch_msg (IDReq) returns (BatchMsgInfoResp)
  77. }