sop_stage.api 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. import "../base.api"
  2. type (
  3. // The response data of sop stage information | SopStage信息
  4. SopStageInfo {
  5. BaseIDInfo
  6. // Status 1: normal 2: ban | 状态 1 正常 2 禁用
  7. Status *uint8 `json:"status,optional"`
  8. // SOP 任务 ID
  9. TaskId *uint64 `json:"taskId,optional"`
  10. // 阶段名称
  11. Name *string `json:"name,optional"`
  12. // 客群筛选条件类型 1 按标签筛选 2 按客户基本信息筛选
  13. ConditionType *int `json:"conditionType,optional"`
  14. // 筛选条件关系 1 满足所有条件(and) 2 满足任意条件(or)
  15. ConditionOperator *int `json:"conditionOperator,optional"`
  16. // 筛选条件列表
  17. ConditionList []Condition `json:"conditionList,optional"`
  18. // 命中后发送的消息内容
  19. ActionMessage []Action `json:"actionMessage,optional"`
  20. // 命中后需要打的标签
  21. ActionLabel []int `json:"actionLabel,optional"`
  22. // 阶段顺序
  23. IndexSort *int `json:"indexSort,optional"`
  24. // sop 任务信息
  25. TaskInfo *SopTaskInfo `json:"taskInfo,optional"`
  26. // node 信息
  27. NodeList []SopNodeInfo `json:"nodeList,optional"`
  28. }
  29. // The response data of sop task information | SopTask信息
  30. SopTaskInfo {
  31. BaseIDInfo
  32. // Status 1: normal 2: ban | 状态 1 正常 2 禁用
  33. Status *uint8 `json:"status,optional"`
  34. // SOP 任务名称
  35. Name *string `json:"name,optional"`
  36. // 机器人微信 id 列表
  37. BotWxidList []string `json:"botWxidList,optional"`
  38. // 标签类型:1好友,2群组,3企业微信联系人
  39. Type *int `json:"type,optional"`
  40. // 任务计划开始时间
  41. PlanStartTime *int64 `json:"planStartTime,optional"`
  42. // 任务计划结束时间
  43. PlanEndTime *int64 `json:"planEndTime,optional"`
  44. // 创建者 id
  45. CreatorId *string `json:"creatorId,optional"`
  46. // 阶段信息
  47. StageList []SopStageInfo `json:"stageList,optional"`
  48. }
  49. // The response data of sop node information | SopNode信息
  50. SopNodeInfo {
  51. BaseIDInfo
  52. // Status 1: normal 2: ban | 状态 1 正常 2 禁用
  53. Status *uint8 `json:"status,optional"`
  54. // 阶段 ID
  55. StageId *uint64 `json:"stageId,optional"`
  56. // 父节点 ID
  57. ParentId *uint64 `json:"parentId,optional"`
  58. // 节点名称
  59. Name *string `json:"name,optional"`
  60. // 触发条件类型 1 客户回复后触发 2 超时后触发
  61. ConditionType *int `json:"conditionType,optional"`
  62. // 触发语义列表 当为空时则代表用户回复任意内容后触发
  63. ConditionList []string `json:"conditionList,optional"`
  64. // 命中后发送的消息内容
  65. ActionMessage []Action `json:"actionMessage,optional"`
  66. // 命中后需要打的标签
  67. ActionLabel []int `json:"actionLabel,optional"`
  68. // 阶段信息
  69. StageInfo *SopStageInfo `json:"stageInfo,optional"`
  70. }
  71. // The response data of sop stage list | SopStage列表数据
  72. SopStageListResp {
  73. BaseDataInfo
  74. // SopStage list data | SopStage列表数据
  75. Data SopStageListInfo `json:"data"`
  76. }
  77. // SopStage list data | SopStage列表数据
  78. SopStageListInfo {
  79. BaseListInfo
  80. // The API list data | SopStage列表数据
  81. Data []SopStageInfo `json:"data"`
  82. }
  83. // Get sop stage list request params | SopStage列表请求参数
  84. SopStageListReq {
  85. PageInfo
  86. // 阶段名称
  87. Name *string `json:"name,optional"`
  88. }
  89. // SopStage information response | SopStage信息返回体
  90. SopStageInfoResp {
  91. BaseDataInfo
  92. // SopStage information | SopStage数据
  93. Data SopStageInfo `json:"data"`
  94. }
  95. // Move sop stage request params | 移动阶段请求参数
  96. SopStageMoveReq {
  97. BaseIDInfo
  98. // 阶段名称
  99. Offset *int `json:"offset,optional"`
  100. }
  101. )
  102. @server(
  103. jwt: Auth
  104. group: sop_stage
  105. middleware: Authority
  106. )
  107. service Wechat {
  108. // Create sop stage information | 创建SopStage
  109. @handler createSopStage
  110. post /sop_stage/create (SopStageInfo) returns (BaseMsgResp)
  111. // Update sop stage information | 更新SopStage
  112. @handler updateSopStage
  113. post /sop_stage/update (SopStageInfo) returns (BaseMsgResp)
  114. // Delete sop stage information | 删除SopStage信息
  115. @handler deleteSopStage
  116. post /sop_stage/delete (IDReq) returns (BaseMsgResp)
  117. // Get sop stage list | 获取SopStage列表
  118. @handler getSopStageList
  119. post /sop_stage/list (SopStageListReq) returns (SopStageListResp)
  120. // Get sop stage by ID | 通过ID获取SopStage
  121. @handler getSopStageById
  122. post /sop_stage (IDReq) returns (SopStageInfoResp)
  123. // Get sop stage by ID | 通过ID获取SopStage细节
  124. @handler getSopStageDetail
  125. post /sop_stage/detail (IDReq) returns (SopStageInfoResp)
  126. // Get sop stage move | 移动阶段顺序
  127. @handler moveSopStage
  128. post /sop_stage/move (SopStageMoveReq) returns (BaseMsgResp)
  129. }