sop_stage.api 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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 []uint64 `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 []uint64 `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. TaskId *uint64 `json:"taskId"`
  86. }
  87. // SopStage information response | SopStage信息返回体
  88. SopStageInfoResp {
  89. BaseDataInfo
  90. // SopStage information | SopStage数据
  91. Data SopStageInfo `json:"data"`
  92. }
  93. // Move sop stage request params | 移动阶段请求参数
  94. SopStageMoveReq {
  95. BaseIDInfo
  96. // 阶段名称
  97. Offset *int `json:"offset,optional"`
  98. }
  99. )
  100. @server(
  101. jwt: Auth
  102. group: sop_stage
  103. middleware: Authority
  104. )
  105. service Wechat {
  106. // Create sop stage information | 创建SopStage
  107. @handler createSopStage
  108. post /sop_stage/create (SopStageInfo) returns (BaseMsgResp)
  109. // Update sop stage information | 更新SopStage
  110. @handler updateSopStage
  111. post /sop_stage/update (SopStageInfo) returns (BaseMsgResp)
  112. // Delete sop stage information | 删除SopStage信息
  113. @handler deleteSopStage
  114. post /sop_stage/delete (IDReq) returns (BaseMsgResp)
  115. // Get sop stage list | 获取SopStage列表
  116. @handler getSopStageList
  117. post /sop_stage/list (SopStageListReq) returns (SopStageListResp)
  118. // Get sop stage by ID | 通过ID获取SopStage
  119. @handler getSopStageById
  120. post /sop_stage (IDReq) returns (SopStageInfoResp)
  121. // Get sop stage by ID | 通过ID获取SopStage详情
  122. @handler getSopStageDetail
  123. post /sop_stage/detail (IDReq) returns (SopStageInfoResp)
  124. // Get sop stage move | 移动阶段顺序
  125. @handler moveSopStage
  126. post /sop_stage/move (SopStageMoveReq) returns (BaseMsgResp)
  127. }