wx.api 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. // 组织ID
  27. OrganizationId *uint64 `json:"organizationId,optional"`
  28. }
  29. // The response data of wx list | Wx列表数据
  30. WxListResp {
  31. BaseDataInfo
  32. // Wx list data | Wx列表数据
  33. Data WxListInfo `json:"data"`
  34. }
  35. // Wx list data | Wx列表数据
  36. WxListInfo {
  37. BaseListInfo
  38. // The API list data | Wx列表数据
  39. Data []WxInfo `json:"data"`
  40. }
  41. // Get wx list request params | Wx列表请求参数
  42. WxListReq {
  43. PageInfo
  44. // 端口号
  45. Port *string `json:"port,optional"`
  46. // 进程号
  47. ProcessId *string `json:"processId,optional"`
  48. // 回调地址
  49. Callback *string `json:"callback,optional"`
  50. }
  51. // Wx information response | Wx信息返回体
  52. WxInfoResp {
  53. BaseDataInfo
  54. // Wx information | Wx数据
  55. Data WxInfo `json:"data"`
  56. }
  57. )
  58. @server(
  59. jwt: Auth
  60. group: Wx
  61. middleware: Authority
  62. )
  63. service Wechat {
  64. // Create wx information | 创建Wx
  65. @handler createWx
  66. post /wx/create (WxInfo) returns (BaseMsgResp)
  67. // Update wx information | 更新Wx
  68. @handler updateWx
  69. post /wx/update (WxInfo) returns (BaseMsgResp)
  70. // Delete wx information | 删除Wx信息
  71. @handler deleteWx
  72. post /wx/delete (IDsReq) returns (BaseMsgResp)
  73. // Get wx list | 获取Wx列表
  74. @handler getWxList
  75. post /wx/list (WxListReq) returns (WxListResp)
  76. // Get wx by ID | 通过ID获取Wx
  77. @handler getWxById
  78. post /wx (IDReq) returns (WxInfoResp)
  79. }