application.api 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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. AccountId int64 `header:"accountId,optional"`
  15. CluesSource string `json:"cluesSource"` //线索来源
  16. ClueName string `json:"clueName"` //线索名称
  17. Summary string `json:"summary"` //概要信息
  18. FollowUpTime int64 `json:"followUpTime,optional"` //下次跟进时间(时间戳)
  19. Types int64 `json:"types"` //处理方式 1自办;2转办
  20. User []int64 `json:"user,optional"` //企业用户id
  21. EmployInfoId int64 `json:"employInfoId"` //资讯收录id
  22. CreateName string `json:"createName"` //创建人
  23. }
  24. SaleChanceReq {
  25. AppId string `header:"appId,default=10000"`
  26. BaseUserId int64 `header:"newUserId"`
  27. PositionId int64 `header:"positionId,optional"`
  28. EntUserId int64 `header:"entUserId,optional"`
  29. EntId int64 `header:"entId,optional"`
  30. AccountId int64 `header:"accountId,optional"`
  31. ChanceName string `json:"chanceName"` //机会名称
  32. Summary string `json:"summary"` //概要信息
  33. ChanceClassify int64 `json:"chanceClassify"` //机会分类
  34. ExpectedOrderTime int64 `json:"expectedOrderTime,optional"` //最初预计落单段时间 时间戳
  35. ExpectedMoney int64 `json:"expectedMoney,optional"` //最初预计落单金额
  36. CustomName string `json:"customName"` //客户全称
  37. BusinessType int64 `json:"businessType"` //业务类型 1新客户需求 2老客户需求 3简易项目流程
  38. Remarks string `json:"remarks,optional"` //备注
  39. NextfollowUpTime int64 `json:"nextfollowUpTime,optional"` //下次跟进时间戳
  40. Types int64 `json:"types"` //处理方式 1自办;2转办
  41. User []int64 `json:"user,optional"` //企业用户id
  42. EmployInfoId int64 `json:"employInfoId"` //资讯收录id
  43. CustomId int64 `json:"customId"` //客户id
  44. CreateName string `json:"createName"` //创建人
  45. }
  46. EmployOperateReq {
  47. AppId string `header:"appId,default=10000"`
  48. BaseUserId int64 `header:"newUserId"`
  49. PositionId int64 `header:"positionId,optional"`
  50. EntUserId int64 `header:"entUserId,optional"`
  51. EntId int64 `header:"entId,optional"`
  52. IdArr string `json:"idArr"` //信息id多条信息
  53. IsEmploy bool `json:"isEmploy"` //是否收录true收录 false取消收录
  54. EmployType int64 `json:"employType"` //来源方式来源;1招标采购、2企业、3采购单位、4拟在建项目
  55. EntDeptId int64 `header:"entDeptId,optional"`
  56. }
  57. TransferReq {
  58. AppId string `header:"appId,default=10000"`
  59. BaseUserId int64 `header:"newUserId"`
  60. PositionId int64 `header:"positionId,optional"`
  61. EntUserId int64 `header:"entUserId,optional"`
  62. EntId int64 `header:"entId,optional"`
  63. EmplouIdArr []string `json:"emplouIdArr"`
  64. PositionIdArr []string `json:"positionIdArr"`
  65. }
  66. IgnoreOperateReq {
  67. AppId string `header:"appId,default=10000"`
  68. BaseUserId int64 `header:"newUserId"`
  69. PositionId int64 `header:"positionId,optional"`
  70. EntUserId int64 `header:"entUserId,optional"`
  71. EntId int64 `header:"entId,optional"`
  72. IdArr string `json:"idArr"` //id集合
  73. IsIgnore bool `json:"isIgnore"` //是否忽略 true 忽略 false取消忽略
  74. EmployType int64 `json:"employType"` //来源方式来源;1招标采购、2企业、3采购单位、4拟在建项目
  75. }
  76. InfoEmployinfoReq {
  77. AppId string `header:"appId,default=10000"`
  78. BaseUserId int64 `header:"newUserId"`
  79. PositionId int64 `header:"positionId,optional"`
  80. EntUserId int64 `header:"entUserId,optional"`
  81. EntId int64 `header:"entId,optional"`
  82. EmployType int64 `json:"employType"` //1标采购、2企业、3采购单位、4拟在建项目
  83. IdArr string `json:"idArr"` //id
  84. EntNicheDis int64 `header:"entNicheDis,optional"`
  85. EntDeptId int64 `header:"entDeptId,optional"`
  86. }
  87. CustomAddReq {
  88. AppId string `header:"appId,default=10000"`
  89. BaseUserId int64 `header:"newUserId"`
  90. PositionId int64 `header:"positionId,optional"`
  91. EntUserId int64 `header:"entUserId,optional"`
  92. EntId int64 `header:"entId,optional"`
  93. AccountId int64 `header:"accountId,optional"`
  94. CustomType int64 `json:"customType"` //客户类型
  95. Summary string `json:"summary"` //概要信息
  96. CustomAllName string `json:"customAllName"` //客户全称
  97. CustomAbbreviation string `json:"customAbbreviation"` //客户简称
  98. CustomLevel int64 `json:"customLevel,optional"` //客户级别
  99. CustomIndustry int64 `json:"customIndustry"` //客户行业
  100. CustomDetailIndustry int64 `json:"customDetailIndustry"` //客户细分行业
  101. Province string `json:"province,optional"` //省份
  102. City string `json:"city,optional"` //城市
  103. District string `json:"district,optional"` //地区
  104. Address string `json:"address,optional"` //详细地址
  105. CompanyPhone string `json:"companyPhone,optional"` //公司电话
  106. NextfollowUpTime int64 `json:"nextfollowUpTime,optional"` //下次跟进时间戳
  107. Types int64 `json:"types"` //处理方式 1自办;2转办
  108. User []int64 `json:"user,optional"` //转办用户
  109. EmployCustomId int64 `json:"employCustomId,optional"` //客户收录id
  110. EmployInfoId int64 `json:"employInfoId,optional"` //资讯收录id
  111. Remarks string `json:"remarks,optional"` //备注
  112. CreateName string `json:"createName"` //创建人
  113. }
  114. FileUploadReq {
  115. AppId string `header:"appId,default=10000"`
  116. BaseUserId int64 `header:"newUserId"`
  117. PositionId int64 `header:"positionId,optional"`
  118. EntUserId int64 `header:"entUserId,optional"`
  119. EntId int64 `header:"entId,optional"`
  120. BusinessId int64 `form:"businessId"` //业务id
  121. Types int64 `form:"type"` //类型;1:跟进记录-线下 2:跟进记录-线上 3:跟进记录-备忘 4:销售机会-项目文档 5:客户-客户档案
  122. FileType int64 `form:"fileType"` //文件类型,产品介绍、项目方案、立项报告、报价文件、招标文件、投标文件、中标通知书、合同、发票、其他文件
  123. }
  124. EmployDistributeReq {
  125. AppId string `header:"appId,default=10000"`
  126. BaseUserId int64 `header:"newUserId"`
  127. PositionId int64 `header:"positionId,optional"`
  128. EntUserId int64 `header:"entUserId,optional"`
  129. EntId int64 `header:"entId,optional"`
  130. EmployIdArr string `json:"employIdArr"`
  131. Person []DistributePerson `json:"person"`
  132. EntNicheDis int64 `header:"entNicheDis,optional"`
  133. EntDeptId int64 `header:"entDeptId,optional"`
  134. }
  135. DistributePerson {
  136. PositionId int64 `json:"positionId"`
  137. EntUserId int64 `json:"entUserId"`
  138. EntDeptId int64 `json:"entDeptId"`
  139. }
  140. EntInfoReq {
  141. EntName string `json:"entName"`
  142. }
  143. PushMsgReq {
  144. AppId string `header:"appId,default=10000"`
  145. BaseUserId int64 `header:"newUserId"`
  146. PositionId int64 `header:"positionId,optional"`
  147. EntUserId int64 `header:"entUserId,optional"`
  148. EntId int64 `header:"entId,optional"`
  149. Title string `json:"title"` //标题
  150. Content string `json:"content"` //内容
  151. PcHref string `json:"pcHref"` //pc跳转地址
  152. MobileHref string `json:"mobileHref"` //移动端跳转地址
  153. User []int64 `json:"user,optional"` //企业用户id
  154. }
  155. )
  156. service crmApplication {
  157. @doc "添加线索"
  158. @handler clueAdd
  159. post /crmApplication/clue/add (ClueAddReq) returns (Reply)
  160. @doc "创建销售机会"
  161. @handler saleChanceAdd
  162. post /crmApplication/saleChance/add (SaleChanceReq) returns (Reply)
  163. @doc "收录操作"
  164. @handler employOperate
  165. post /crmApplication/employ/operate (EmployOperateReq) returns (Reply)
  166. @doc "商业资讯的转办"
  167. @handler transfer
  168. post /crmApplication/information/transfer (TransferReq) returns (Reply)
  169. @doc "忽略操作"
  170. @handler ignoreOperate
  171. post /crmApplication/ignore/operate (IgnoreOperateReq) returns (Reply)
  172. @doc "收录情况"
  173. @handler employInfo
  174. post /crmApplication/employ/info (InfoEmployinfoReq) returns (Reply)
  175. @doc "创建客户"
  176. @handler customAdd
  177. post /crmApplication/custom/add (CustomAddReq) returns (Reply)
  178. @doc "文件上传"
  179. @handler fileUpload
  180. post /crmApplication/file/upload(FileUploadReq) returns (Reply)
  181. @doc "分发"
  182. @handler employDistribute
  183. post /crmApplication/employ/distribute(EmployDistributeReq) returns (Reply)
  184. @doc "企业详情"
  185. @handler entinfo
  186. post /crmApplication/ent/info(EntInfoReq) returns (Reply)
  187. @doc "消息推送"
  188. @handler pushMsg
  189. post /crmApplication/info/push(PushMsgReq) returns (Reply)
  190. }