wx.api 2.3 KB

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