xunji.api 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. import "../base.api"
  2. type (
  3. // The data of xunji information | Xunji信息
  4. XunjiInfo {
  5. BaseIDInfo
  6. // Status 1: normal 2: ban | 状态 1 正常 2 禁用
  7. Status *uint8 `json:"status,optional"`
  8. // AppKey
  9. AppKey *string `json:"appKey,optional"`
  10. // AppSecret
  11. AppSecret *string `json:"appSecret,optional"`
  12. // Token
  13. Token *string `json:"token,optional"`
  14. // 加密key
  15. EncodingKey *string `json:"encodingKey,optional"`
  16. // organization_id | 租户ID
  17. OrganizationId *uint64 `json:"organizationId,optional"`
  18. }
  19. // The response data of xunji list | Xunji列表数据
  20. XunjiListResp {
  21. BaseDataInfo
  22. // Xunji list data | Xunji列表数据
  23. Data XunjiListInfo `json:"data"`
  24. }
  25. // Xunji list data | Xunji列表数据
  26. XunjiListInfo {
  27. BaseListInfo
  28. // The API list data | Xunji列表数据
  29. Data []XunjiInfo `json:"data"`
  30. }
  31. // Get xunji list request params | Xunji列表请求参数
  32. XunjiListReq {
  33. PageInfo
  34. // AppKey
  35. AppKey *string `json:"appKey,optional"`
  36. // AppSecret
  37. AppSecret *string `json:"appSecret,optional"`
  38. // Token
  39. Token *string `json:"token,optional"`
  40. }
  41. // Xunji information response | Xunji信息返回体
  42. XunjiInfoResp {
  43. BaseDataInfo
  44. // Xunji information | Xunji数据
  45. Data XunjiInfo `json:"data"`
  46. }
  47. )
  48. @server(
  49. jwt: Auth
  50. group: xunji
  51. middleware: Authority
  52. )
  53. service Wechat {
  54. // Create xunji information | 创建Xunji
  55. @handler createXunji
  56. post /xunji/create (XunjiInfo) returns (BaseMsgResp)
  57. // Update xunji information | 更新Xunji
  58. @handler updateXunji
  59. post /xunji/update (XunjiInfo) returns (BaseMsgResp)
  60. // Delete xunji information | 删除Xunji信息
  61. @handler deleteXunji
  62. post /xunji/delete (IDsReq) returns (BaseMsgResp)
  63. // Get xunji list | 获取Xunji列表
  64. @handler getXunjiList
  65. post /xunji/list (XunjiListReq) returns (XunjiListResp)
  66. // Get xunji by ID | 通过ID获取Xunji
  67. @handler getXunjiById
  68. post /xunji (IDReq) returns (XunjiInfoResp)
  69. // Get xunji | 通过机构ID获取Xunji
  70. @handler getXunji
  71. post /xunji/detail () returns (XunjiInfoResp)
  72. }