application.api 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. syntax = "v1"
  2. type (
  3. Reply {
  4. Error_code int64 `json:"error_code"`
  5. Error_msg string `json:"error_msg"`
  6. Data interface{} `json:"data"`
  7. }
  8. InfoReply {
  9. Error_code int64 `json:"error_code"`
  10. Error_msg string `json:"error_msg"`
  11. Data interface{} `json:"data"`
  12. BatchEmploy int64 `json:"batchEmploy"`
  13. }
  14. ClueAddReq {
  15. AppId string `header:"appId,default=10000"`
  16. BaseUserId int64 `header:"newUserId"`
  17. PositionId int64 `header:"positionId,optional"`
  18. EntUserId int64 `header:"entUserId,optional"`
  19. EntId int64 `header:"entId,optional"`
  20. AccountId int64 `header:"accountId,optional"`
  21. EntDeptId int64 `header:"entDeptId,optional"`
  22. CluesSource string `json:"cluesSource"` //线索来源
  23. ClueName string `json:"clueName"` //线索名称
  24. Summary string `json:"summary"` //概要信息
  25. FollowUpTime int64 `json:"followUpTime,optional"` //下次跟进时间(时间戳)
  26. Types int64 `json:"types"` //处理方式 1自办;2转办;3待处理
  27. User []int64 `json:"user,optional"` //企业用户id
  28. EmployInfoId int64 `json:"employInfoId,optional"` //资讯收录id
  29. CreateName string `json:"createName"` //创建人
  30. Channel string `json:"channel"` //渠道来源:网页、手动创建
  31. }
  32. SaleChanceReq {
  33. AppId string `header:"appId,default=10000"`
  34. BaseUserId int64 `header:"newUserId"`
  35. PositionId int64 `header:"positionId,optional"`
  36. EntUserId int64 `header:"entUserId,optional"`
  37. EntId int64 `header:"entId,optional"`
  38. AccountId int64 `header:"accountId,optional"`
  39. EntDeptId int64 `header:"entDeptId,optional"`
  40. ChanceName string `json:"chanceName"` //机会名称
  41. Summary string `json:"summary"` //概要信息
  42. ChanceClassify int64 `json:"chanceClassify"` //机会分类
  43. ExpectedOrderTime int64 `json:"expectedOrderTime,optional"` //最初预计落单段时间 时间戳
  44. ExpectedMoney float64 `json:"expectedMoney,optional"` //最初预计落单金额
  45. CustomName string `json:"customName"` //客户全称
  46. BusinessType int64 `json:"businessType"` //业务类型 1新客户需求 2老客户需求 3简易项目流程
  47. Remarks string `json:"remarks,optional"` //备注
  48. NextfollowUpTime int64 `json:"nextfollowUpTime,optional"` //下次跟进时间戳
  49. Types int64 `json:"types"` //处理方式 1自办;2转办;3待处理
  50. User []int64 `json:"user,optional"` //企业用户id
  51. EmployInfoId int64 `json:"employInfoId,optional"` //资讯收录id
  52. CustomId int64 `json:"customId,optional"` //客户id
  53. CreateName string `json:"createName"` //创建人
  54. ChanceSource int64 `json:"chanceSource"` //机会来源
  55. OwnerId int64 `json:"ownerId,optional"` //潜客收录id(人脉)
  56. BusinessId int64 `json:"businessId,optional"` //商机收录id(人脉)
  57. }
  58. EmployOperateReq {
  59. AppId string `header:"appId,default=10000"`
  60. BaseUserId int64 `header:"newUserId"`
  61. PositionId int64 `header:"positionId,optional"`
  62. EntUserId int64 `header:"entUserId,optional"`
  63. EntId int64 `header:"entId,optional"`
  64. IdArr string `json:"idArr"` //信息id多条信息
  65. IsEmploy bool `json:"isEmploy"` //是否收录true收录 false取消收录
  66. EmployType int64 `json:"employType"` //来源方式来源;1招标采购、2企业、3采购单位、4拟在建项目
  67. EntDeptId int64 `header:"entDeptId,optional"`
  68. From string `json:"from,optional"` //来源
  69. }
  70. TransferReq {
  71. AppId string `header:"appId,default=10000"`
  72. BaseUserId int64 `header:"newUserId"`
  73. PositionId int64 `header:"positionId,optional"`
  74. EntUserId int64 `header:"entUserId,optional"`
  75. EntId int64 `header:"entId,optional"`
  76. EmplouIdArr []string `json:"emplouIdArr"`
  77. PositionIdArr []string `json:"positionIdArr"`
  78. }
  79. IgnoreOperateReq {
  80. AppId string `header:"appId,default=10000"`
  81. BaseUserId int64 `header:"newUserId"`
  82. PositionId int64 `header:"positionId,optional"`
  83. EntUserId int64 `header:"entUserId,optional"`
  84. EntId int64 `header:"entId,optional"`
  85. IdArr string `json:"idArr"` //id集合
  86. IsIgnore bool `json:"isIgnore"` //是否忽略 true 忽略 false取消忽略
  87. EmployType int64 `json:"employType"` //来源方式来源;1招标采购、2企业、3采购单位、4拟在建项目
  88. }
  89. InfoEmployinfoReq {
  90. AppId string `header:"appId,default=10000"`
  91. BaseUserId int64 `header:"newUserId"`
  92. PositionId int64 `header:"positionId,optional"`
  93. EntUserId int64 `header:"entUserId,optional"`
  94. EntId int64 `header:"entId,optional"`
  95. EmployType int64 `json:"employType"` //1标采购、2企业、3采购单位、4拟在建项目
  96. IdArr string `json:"idArr"` //id
  97. EntNicheDis int64 `header:"entNicheDis,optional"`
  98. EntDeptId int64 `header:"entDeptId,optional"`
  99. PositionType int64 `header:"positionType,optional"` //职位类型 0个人 1企业
  100. AccountId int64 `header:"accountId,optional"` //账户id
  101. EntAccountId int64 `header:"entAccountId,optional"` //企业账户id
  102. From string `json:"from,optional"` //来源
  103. }
  104. CustomAddReq {
  105. AppId string `header:"appId,default=10000"`
  106. BaseUserId int64 `header:"newUserId"`
  107. PositionId int64 `header:"positionId,optional"`
  108. EntUserId int64 `header:"entUserId,optional"`
  109. EntId int64 `header:"entId,optional"`
  110. AccountId int64 `header:"accountId,optional"`
  111. EntDeptId int64 `header:"entDeptId,optional"`
  112. CustomType int64 `json:"customType"` //客户类型
  113. Summary string `json:"summary"` //概要信息
  114. CustomAllName string `json:"customAllName"` //客户全称
  115. CustomAbbreviation string `json:"customAbbreviation"` //客户简称
  116. CustomLevel int64 `json:"customLevel,optional"` //客户级别
  117. CustomIndustry int64 `json:"customIndustry"` //客户行业
  118. CustomDetailIndustry int64 `json:"customDetailIndustry"` //客户细分行业
  119. Province string `json:"province,optional"` //省份
  120. City string `json:"city,optional"` //城市
  121. District string `json:"district,optional"` //地区
  122. Address string `json:"address,optional"` //详细地址
  123. CompanyPhone string `json:"companyPhone,optional"` //公司电话
  124. NextfollowUpTime int64 `json:"nextfollowUpTime,optional"` //下次跟进时间戳
  125. Types int64 `json:"types"` //处理方式 1自办;2转办
  126. User []int64 `json:"user,optional"` //转办用户
  127. EmployCustomId int64 `json:"employCustomId,optional,optional"` //客户收录id
  128. EmployInfoId int64 `json:"employInfoId,optional,optional"` //资讯收录id
  129. Remarks string `json:"remarks,optional"` //备注
  130. CreateName string `json:"createName"` //创建人
  131. Source string `json:"source,optional"` //来源
  132. OwnerId int64 `json:"ownerId,optional"` //潜客收录id(人脉)
  133. BusinessId int64 `json:"businessId,optional"` //商机收录id(人脉)
  134. }
  135. FileUploadReq {
  136. AppId string `header:"appId,default=10000"`
  137. BaseUserId int64 `header:"newUserId"`
  138. PositionId int64 `header:"positionId,optional"`
  139. EntUserId int64 `header:"entUserId,optional"`
  140. EntId int64 `header:"entId,optional"`
  141. BusinessId int64 `form:"businessId"` //业务id
  142. Types int64 `form:"type"` //类型;1:跟进记录-线下 2:跟进记录-线上 3:跟进记录-备忘 4:销售机会-项目文档 5:客户-客户档案
  143. FileType int64 `form:"fileType"` //文件类型,产品介绍、项目方案、立项报告、报价文件、招标文件、投标文件、中标通知书、合同、发票、其他文件
  144. }
  145. EmployDistributeReq {
  146. AppId string `header:"appId,default=10000"`
  147. BaseUserId int64 `header:"newUserId"`
  148. PositionId int64 `header:"positionId,optional"`
  149. EntUserId int64 `header:"entUserId,optional"`
  150. EntId int64 `header:"entId,optional"`
  151. EmployIdArr string `json:"employIdArr"`
  152. Person []DistributePerson `json:"person"`
  153. EntNicheDis int64 `header:"entNicheDis,optional"`
  154. EntDeptId int64 `header:"entDeptId,optional"`
  155. }
  156. DistributePerson {
  157. PositionId int64 `json:"positionId"`
  158. EntUserId int64 `json:"entUserId"`
  159. EntDeptId int64 `json:"entDeptId"`
  160. }
  161. EntInfoReq {
  162. EntName string `json:"entName"`
  163. }
  164. PushMsgReq {
  165. AppId string `header:"appId,default=10000"`
  166. BaseUserId int64 `header:"newUserId"`
  167. PositionId int64 `header:"positionId,optional"`
  168. EntUserId int64 `header:"entUserId,optional"`
  169. EntId int64 `header:"entId,optional"`
  170. Title string `json:"title"` //标题
  171. Content string `json:"content"` //内容
  172. PcHref string `json:"pcHref"` //pc跳转地址
  173. MobileHref string `json:"mobileHref"` //移动端跳转地址
  174. User []int64 `json:"user,optional"` //企业用户id
  175. MsgType string `json:"msgType"` //消息类型 1-活动优惠 2-服务通知 3-订阅消息 4-项目动态 5-企业动态 6-分析报告 7-系统通知 11-待办
  176. }
  177. CanAddReq {
  178. AppId string `header:"appId,default=10000"`
  179. BaseUserId int64 `header:"newUserId"`
  180. PositionId int64 `header:"positionId,optional"`
  181. EntUserId int64 `header:"entUserId,optional"`
  182. EntId int64 `header:"entId,optional"`
  183. AccountId int64 `header:"accountId,optional"`
  184. EntDeptId int64 `header:"entDeptId,optional"`
  185. EmployInfoId int64 `json:"employInfoId"` //资讯收录id
  186. EmployCustomId int64 `json:"employCustomId,optional"` //客户收录id
  187. Key string `json:"key"` //创建线索:more_create_clue 创建机会:more_create_chance 创建客户:more_create_custom
  188. }
  189. ProjectListReq {
  190. PositionId int64 `header:"positionId,optional"`
  191. EntId string `header:"entId,optional"`
  192. EntUserId string `header:"entUserId,optional"`
  193. DeptId string `header:"deptId,optional"` //部门id
  194. pageNum int64 `json:"pageNum"`
  195. pageSize int64 `json:"pageSize"`
  196. businessType string `json:"businessType"`
  197. saleStatus int `json:"saleStatus"`
  198. projectName string `json:"projectName"`
  199. startTime int64 `json:"startTime"`
  200. entTime int64 `json:"entTime"`
  201. area string `json:"area"`
  202. city string `json:"city"`
  203. district string `json:"district"`
  204. propertyForm string `json:"propertyForm"`
  205. subClass string `json:"subClass"`
  206. amount string `json:"amount"`
  207. }
  208. PnameAssReq {
  209. ProjectName string `json:"projectName"`
  210. }
  211. CoopHistoryReq {
  212. EntAccountId int64 `header:"entAccountId,optional"` //企业账户id
  213. PositionId int64 `header:"positionId,optional"`
  214. EntId string `header:"entId,optional"`
  215. EntUserId string `header:"entUserId,optional"`
  216. DeptId string `header:"deptId,optional"` //部门id
  217. Pid string `json:"porjectId"`
  218. ChannelType int `json:"channelType"`
  219. }
  220. )
  221. @server (
  222. // 定义一个请求体限制在 100MB 以内的请求,goctl >= 1.5.0 版本支持 (默认1mb)
  223. maxBytes: 104857600
  224. )
  225. service crmApplication {
  226. @doc "添加线索"
  227. @handler clueAdd
  228. post /crmApplication/clue/add (ClueAddReq) returns (Reply)
  229. @doc "创建销售机会"
  230. @handler saleChanceAdd
  231. post /crmApplication/saleChance/add (SaleChanceReq) returns (Reply)
  232. @doc "收录操作"
  233. @handler employOperate
  234. post /crmApplication/employ/operate (EmployOperateReq) returns (Reply)
  235. @doc "商业资讯的转办"
  236. @handler transfer
  237. post /crmApplication/information/transfer (TransferReq) returns (Reply)
  238. @doc "忽略操作"
  239. @handler ignoreOperate
  240. post /crmApplication/ignore/operate (IgnoreOperateReq) returns (Reply)
  241. @doc "收录情况"
  242. @handler employInfo
  243. post /crmApplication/employ/info (InfoEmployinfoReq) returns (InfoReply)
  244. @doc "创建客户"
  245. @handler customAdd
  246. post /crmApplication/custom/add (CustomAddReq) returns (Reply)
  247. @doc "文件上传"
  248. @handler fileUpload
  249. post /crmApplication/file/upload (FileUploadReq) returns (Reply)
  250. @doc "分发"
  251. @handler employDistribute
  252. post /crmApplication/employ/distribute (EmployDistributeReq) returns (Reply)
  253. @doc "企业详情"
  254. @handler entinfo
  255. post /crmApplication/ent/info (EntInfoReq) returns (Reply)
  256. @doc "消息推送"
  257. @handler pushMsg
  258. post /crmApplication/info/push (PushMsgReq) returns (Reply)
  259. @doc "是否可以创建"
  260. @handler canAddReq
  261. post /crmApplication/info/canAdd (CanAddReq) returns (Reply)
  262. @doc "人脉可达商机列表"
  263. @handler projectList
  264. post /crmApplication/network/project/list (ProjectListReq) returns (Reply)
  265. @doc "项目公关渠道分析-项目名称联想"
  266. @handler PrPnameAss
  267. post /crmApplication/pr/pname/ass (PnameAssReq) returns (Reply)
  268. @doc "项目公关渠道分析-与业主合作历史"
  269. @handler CoopHistoryList
  270. post /crmApplication/pr/coop/history (CoopHistoryReq) returns (Reply)
  271. }