wx.api 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. import "../base.api"
  2. import "./agent.api"
  3. type (
  4. // The response data of wx information | Wx信息
  5. WxInfo {
  6. BaseIDInfo
  7. // Status 1: normal 2: ban | 状态 1 正常 2 禁用
  8. Status *uint8 `json:"status,optional"`
  9. // 服务器id
  10. ServerId *uint64 `json:"serverId,optional"`
  11. // 端口号
  12. Port *string `json:"port,optional"`
  13. // 进程号
  14. ProcessId *string `json:"processId,optional"`
  15. // 回调地址
  16. Callback *string `json:"callback,optional"`
  17. // 微信id
  18. Wxid *string `json:"wxid,optional"`
  19. // 微信账号
  20. Account *string `json:"account,optional"`
  21. // 微信昵称
  22. Nickname *string `json:"nickname,optional"`
  23. // 手机号
  24. Tel *string `json:"tel,optional"`
  25. // 微信头像
  26. HeadBig *string `json:"headBig,optional"`
  27. // 组织ID
  28. OrganizationId *uint64 `json:"organizationId,optional"`
  29. // 模式ID
  30. AgentId *uint64 `json:"agentId"`
  31. // 模式信息
  32. AgentInfo *AgentInfo `json:"agentInfo,optional"`
  33. }
  34. // The response data of wx list | Wx列表数据
  35. WxListResp {
  36. BaseDataInfo
  37. // Wx list data | Wx列表数据
  38. Data WxListInfo `json:"data"`
  39. }
  40. // Wx list data | Wx列表数据
  41. WxListInfo {
  42. BaseListInfo
  43. // The API list data | Wx列表数据
  44. Data []WxInfo `json:"data"`
  45. }
  46. // Get wx list request params | Wx列表请求参数
  47. WxListReq {
  48. PageInfo
  49. // 端口号
  50. Port *string `json:"port,optional"`
  51. // 进程号
  52. ProcessId *string `json:"processId,optional"`
  53. // 回调地址
  54. Callback *string `json:"callback,optional"`
  55. }
  56. // Wx information response | Wx信息返回体
  57. WxInfoResp {
  58. BaseDataInfo
  59. // Wx information | Wx数据
  60. Data WxInfo `json:"data"`
  61. }
  62. )
  63. @server(
  64. jwt: Auth
  65. group: Wx
  66. middleware: Authority
  67. )
  68. service Wechat {
  69. // Create wx information | 创建Wx
  70. @handler createWx
  71. post /wx/create (WxInfo) returns (BaseMsgResp)
  72. // Update wx information | 更新Wx
  73. @handler updateWx
  74. post /wx/update (WxInfo) returns (BaseMsgResp)
  75. // Delete wx information | 删除Wx信息
  76. @handler deleteWx
  77. post /wx/delete (IDsReq) returns (BaseMsgResp)
  78. // Get wx list | 获取Wx列表
  79. @handler getWxList
  80. post /wx/list (WxListReq) returns (WxListResp)
  81. // Get wx by ID | 通过ID获取Wx
  82. @handler getWxById
  83. post /wx (IDReq) returns (WxInfoResp)
  84. }