application.api 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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,optional"` //下次跟进时间(时间戳)
  18. Types int64 `json:"types"` //处理方式 1自办;2转办
  19. User []string `json:"user,optional"` //企业用户id
  20. EmployInfoId int64 `json:"employInfoId"` //资讯收录id
  21. }
  22. SaleChanceReq {
  23. AppId string `header:"appId,default=10000"`
  24. BaseUserId int64 `header:"newUserId"`
  25. PositionId int64 `header:"positionId,optional"`
  26. EntUserId int64 `header:"entUserId,optional"`
  27. EntId int64 `header:"entId,optional"`
  28. ChanceName string `json:"chanceName"` //机会名称
  29. Owner string `json:"owner"` //机会所有者
  30. Summary string `json:"summary"` //概要信息
  31. ChanceClassify int64 `json:"chanceClassify"` //机会分类
  32. ExpectedOrderTime int64 `json:"expectedOrderTime"` //最初预计落单段时间 时间戳
  33. ExpectedMoney int64 `json:"expectedOrderTime"` //最初预计落单金额
  34. CustomName string `json:"customName"` //客户全称
  35. BusinessType string `json:"businessType"` //业务类型
  36. Remarks string `json:"remarks"` //备注
  37. NextfollowUpTime int64 `json:"nextfollowUpTime"` //下次跟进时间戳
  38. Types int64 `json:"types"` //处理方式 1自办;2转办
  39. User []string `json:"user"` //企业用户id
  40. EmployInfoId int64 `json:"employInfoId"` //资讯收录id
  41. CustomId int64 `json:"customId"` //客户id
  42. }
  43. EmployOperateReq {
  44. AppId string `header:"appId,default=10000"`
  45. BaseUserId int64 `header:"newUserId"`
  46. PositionId int64 `header:"positionId,optional"`
  47. EntUserId int64 `header:"entUserId,optional"`
  48. EntId int64 `header:"entId,optional"`
  49. IdArr string `json:"idArr"` //信息id多条信息
  50. IsEmploy bool `json:"isEmploy"` //是否收录true收录 false取消收录
  51. EmployType int64 `json:"employType"` //来源方式来源;1招标采购、2企业、3采购单位、4拟在建项目
  52. }
  53. TransferReq {
  54. AppId string `header:"appId,default=10000"`
  55. BaseUserId int64 `header:"newUserId"`
  56. PositionId int64 `header:"positionId,optional"`
  57. EntUserId int64 `header:"entUserId,optional"`
  58. EntId int64 `header:"entId,optional"`
  59. EmplouIdArr []string `json:"emplouIdArr"`
  60. PositionIdArr []string `json:"positionIdArr"`
  61. }
  62. IgnoreOperateReq {
  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. IdArr string `json:"idArr"` //收录记录集合
  69. IsIgnore bool `json:"isIgnore"` //是否忽略 true 忽略 false取消忽略
  70. EmployType int64 `json:"employType"` //来源方式来源;1招标采购、2企业、3采购单位、4拟在建项目
  71. }
  72. InfoEmployinfoReq {
  73. AppId string `header:"appId,default=10000"`
  74. BaseUserId int64 `header:"newUserId"`
  75. PositionId int64 `header:"positionId,optional"`
  76. EntUserId int64 `header:"entUserId,optional"`
  77. EntId int64 `header:"entId,optional"`
  78. EmployType int64 `json:"employType"` //1标采购、2企业、3采购单位、4拟在建项目
  79. IdArr string `json:"idArr"` //id
  80. }
  81. CustomAddReq {
  82. AppId string `header:"appId,default=10000"`
  83. BaseUserId int64 `header:"newUserId"`
  84. PositionId int64 `header:"positionId,optional"`
  85. EntUserId int64 `header:"entUserId,optional"`
  86. EntId int64 `header:"entId,optional"`
  87. CustomType int64 `json:"customType"` //客户类型
  88. Summary string `json:"summary"` //概要信息
  89. CustomAllName string `json:"customAllName"` //客户全称
  90. CustomAbbreviation string `json:"customAbbreviation"` //客户简称
  91. CustomLevel int64 `json:"customLevel"` //客户级别
  92. CustomIndustry int64 `json:"customIndustry"` //客户行业
  93. CustomDetailIndustry int64 `json:"customDetailIndustry"` //客户细分行业
  94. Province string `json:"province"` //省份
  95. City string `json:"city"` //城市
  96. District string `json:"district"` //地区
  97. Address string `json:"address"` //详细地址
  98. CompanyPhone string `json:"companyPhone"` //公司电话
  99. NextfollowUpTime int64 `json:"nextfollowUpTime"` //下次跟进时间戳
  100. Types int64 `json:"types"` //处理方式 1自办;2转办
  101. User []string `json:"user"` //转办用户
  102. EmployCustomId int64 `json:"employCustomId"` //客户收录id
  103. EmployInfoId int64 `json:"employInfoId"` //资讯收录id
  104. Remarks string `json:"remarks"` //备注
  105. CreateName string `json:"createName"` //创建人
  106. }
  107. FileUploadReq {
  108. }
  109. EmployDistributeReq {
  110. AppId string `header:"appId,default=10000"`
  111. BaseUserId int64 `header:"newUserId"`
  112. PositionId int64 `header:"positionId,optional"`
  113. EntUserId int64 `header:"entUserId,optional"`
  114. EntId int64 `header:"entId,optional"`
  115. EmployIdArr string `json:"employIdArr"`
  116. Person []DistributePerson `json:"person"`
  117. }
  118. DistributePerson {
  119. PositionId int64 `json:"positionId"`
  120. EntUserId int64 `json:"entUserId"`
  121. }
  122. )
  123. service crmApplication {
  124. @doc "添加线索"
  125. @handler clueAdd
  126. post /crmApplication/clue/add (ClueAddReq) returns (Reply)
  127. @doc "创建销售机会"
  128. @handler saleChanceAdd
  129. post /crmApplication/saleChance/add (SaleChanceReq) returns (Reply)
  130. @doc "收录操作"
  131. @handler employOperate
  132. post /crmApplication/employ/operate (EmployOperateReq) returns (Reply)
  133. @doc "商业资讯的转办"
  134. @handler transfer
  135. post /crmApplication/information/transfer (TransferReq) returns (Reply)
  136. @doc "忽略操作"
  137. @handler ignoreOperate
  138. post /crmApplication/ignore/operate (IgnoreOperateReq) returns (Reply)
  139. @doc "收录情况"
  140. @handler employInfo
  141. post /crmApplication/employ/info (InfoEmployinfoReq) returns (Reply)
  142. @doc "创建客户"
  143. @handler customAdd
  144. post /crmApplication/custom/add (CustomAddReq) returns (Reply)
  145. @doc "文件上传"
  146. @handler fileUpload
  147. post /crmApplication/file/upload(FileUploadReq) returns (Reply)
  148. @doc "分发"
  149. @handler employDistribute
  150. post /crmApplication/employ/distribute(EmployDistributeReq) returns (Reply)
  151. }