application.api 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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. ClueAddReq {
  9. AppId string `header:"appId,default=10000"`
  10. BaseUserId int64 `header:"newUserId"`
  11. PositionId int64 `header:"positionId,optional"`
  12. EntUserId int64 `header:"entUserId,optional"`
  13. EntId int64 `header:"entId,optional"`
  14. CluesSource string `json:"cluesSource"` //线索来源
  15. ClueName string `json:"clueName"` //线索名称
  16. Summary string `json:"summary"` //概要信息
  17. FollowUpTime int64 `json:"followUpTime"` //下次跟进时间(时间戳)
  18. Types int64 `json:"types"` //处理方式 1自办;2转办
  19. User []string `json:"user"` //企业用户id
  20. }
  21. SaleChanceReq {
  22. AppId string `header:"appId,default=10000"`
  23. BaseUserId int64 `header:"newUserId"`
  24. PositionId int64 `header:"positionId,optional"`
  25. EntUserId int64 `header:"entUserId,optional"`
  26. EntId int64 `header:"entId,optional"`
  27. ChanceName string `json:"chanceName"` //机会名称
  28. Owner string `json:"owner"` //机会所有者
  29. Summary string `json:"summary"` //概要信息
  30. ChanceClassify string `json:"chanceClassify"` //机会分类
  31. ExpectedOrderTime int64 `json:"expectedOrderTime"` //最初预计落单段时间 时间戳
  32. ExpectedMoney int64 `json:"expectedOrderTime"` //最初预计落单金额
  33. CustomName string `json:"customName"` //客户全称
  34. BusinessType string `json:"businessType"` //业务类型
  35. Remarks string `json:"remarks"` //备注
  36. NextfollowUpTime int64 `json:"nextfollowUpTime"` //下次跟进时间戳
  37. Types int64 `json:"types"` //处理方式 1自办;2转办
  38. User []string `json:"user"` //企业用户id
  39. }
  40. InfoOperateReq {
  41. AppId string `header:"appId,default=10000"`
  42. BaseUserId int64 `header:" newUserId"`
  43. PositionId int64 `header:"positionId,optional"`
  44. EntUserId int64 `header:"entUserId,optional"`
  45. EntId int64 `header:"entId,optional"`
  46. InfoIdArr []string `json:"infoIdArr"` //信息id多条信息
  47. IsEmploy bool `json:"isEmploy"` //是否收录true收录 false取消收录
  48. SourceType int64 `json:"sourceType"` //来源方式来源;1:标讯信息 2:拟建项目
  49. EmployType int64 `json:"employType"` //收录方式类型;1:线索处理 2:机会挖掘 3:任务复盘
  50. }
  51. CompanyOperateReq {
  52. AppId string `header:"appId,default=10000"`
  53. BaseUserId int64 `header:" newUserId"`
  54. PositionId int64 `header:"positionId,optional"`
  55. EntUserId int64 `header:"entUserId,optional"`
  56. EntId int64 `header:"entId,optional"`
  57. CompanyId []string `json:"companyId"` //企业标识
  58. IsEmploy bool `json:"IsEmploy"` //是否收录true收录false取消收录
  59. SourceType int64 `json:"sourceType"` //来源;1:企业搜索 2:采购单位搜索
  60. EmployType int64 `json:"employType"` //收录方式;1:检索 2:自动导入
  61. }
  62. TransferReq {
  63. AppId string `header:"appId,default=10000"`
  64. BaseUserId int64 `header:"newUserId"`
  65. PositionId int64 `header:"positionId,optional"`
  66. EntUserId int64 `header:"entUserId,optional"`
  67. EntId int64 `header:"entId,optional"`
  68. EmplouIdArr []string `json:"emplouIdArr"`
  69. PositionIdArr []string `json:"positionIdArr"`
  70. }
  71. IgnoreOperateReq {
  72. AppId string `header:"appId,default=10000"`
  73. BaseUserId int64 `header:"newUserId"`
  74. PositionId int64 `header:"positionId,optional"`
  75. EntUserId int64 `header:"entUserId,optional"`
  76. EntId int64 `header:"entId,optional"`
  77. EmployIdArr []string `json:"employIdArr"` //收录记录集合
  78. IsEmploy bool `json:"isEmploy"` //是否忽略 true 忽略 false取消忽略
  79. }
  80. InfoEmployinfoReq {
  81. AppId string `header:"appId,default=10000"`
  82. BaseUserId int64 `header:"newUserId"`
  83. PositionId int64 `header:"positionId,optional"`
  84. EntUserId int64 `header:"entUserId,optional"`
  85. EntId int64 `header:"entId,optional"`
  86. EmployType int64 `json:"employType"` //1资讯收录2客户收录
  87. Id string `json:"id"` //id
  88. }
  89. CustomAddReq {
  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. CustomType string `json:"customType"` //客户类型
  96. Summary string `json:"summary"` //概要信息
  97. CustomAllName string `json:"customAllName"` //客户全称
  98. CustomAbbreviation string `json:"customAbbreviation"` //客户简称
  99. CustomLevel string `json:"customLevel"` //客户级别
  100. CustomIndustry string `json:"customIndustry"` //客户行业
  101. CustomDetailIndustry string `json:"customDetailIndustry"` //客户细分行业
  102. Province string `json:"province"` //省份
  103. City string `json:"city"` //城市
  104. District string `json:"district"` //地区
  105. Address string `json:"address"` //详细地址
  106. CompanyPhone string `json:"companyPhone"` //公司电话
  107. NextfollowUpTime int64 `json:"nextfollowUpTime"` //下次跟进时间戳
  108. Types string `json:"types"` //处理方式 1自办;2转办
  109. User []string `json:"user"` //转办用户
  110. }
  111. )
  112. service crmApplication {
  113. @doc "添加线索"
  114. @handler clueAdd
  115. post /crmApplication/clue/add (ClueAddReq) returns (Reply)
  116. @doc "创建销售机会"
  117. @handler saleChanceAdd
  118. post /crmApplication/saleChance/add (SaleChanceReq) returns (Reply)
  119. @doc "标讯收录操作"
  120. @handler infoOperate
  121. post /crmApplication/infoEmploy/operate (InfoOperateReq) returns (Reply)
  122. @doc "客户收录操作"
  123. @handler companyOperate
  124. post /crmApplication/companyEmploy/operate (CompanyOperateReq) returns (Reply)
  125. @doc "商业资讯的转办"
  126. @handler transfer
  127. post /crmApplication/information/transfer (TransferReq) returns (Reply)
  128. @doc "忽略操作"
  129. @handler ignoreOperate
  130. post /crmApplication/ignore/operate (IgnoreOperateReq) returns (Reply)
  131. @doc "收录情况"
  132. @handler infoEmployinfo
  133. post /crmApplication/infoEmploy/info (InfoEmployinfoReq) returns (Reply)
  134. @doc "创建客户"
  135. @handler customAdd
  136. post /crmApplication/custom/add (CustomAddReq) returns (Reply)
  137. }