bxcore.api 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. syntax = "v1"
  2. info (
  3. title: "剑鱼核心模块" // TODO: add title
  4. desc: "标讯搜索、标讯详情、参标逻辑等"// TODO: add description
  5. author: "wangshan"
  6. email: "wangshan@topnet.net.cn"
  7. )
  8. type (
  9. searchReq {
  10. UserType string `path:"userType,optional"`
  11. AppId string `header:"appId"`
  12. UserId string `header:"userId,optional"`
  13. Phone string `header:"phone,optional"`
  14. NewUserId string `header:"newUserId,optional"`
  15. EntId int64 `header:"entId,optional"`
  16. EntUserId int64 `header:"entUserId,optional"`
  17. PageNum int64 `json:"pageNum,optional"`
  18. PageSize int64 `json:"pageSize,optional"`
  19. Province string `json:"province,optional"`
  20. City string `json:"city,optional"`
  21. Subtype string `json:"subtype,optional"`
  22. TopType string `json:"toptype,optional"`
  23. PublishTime string `json:"publishTime,optional"`
  24. SelectType string `json:"selectType,optional"`
  25. Price string `json:"price,optional"`
  26. Industry string `json:"industry,optional"`
  27. BuyerClass string `json:"buyerClass,optional"`
  28. BuyerTel string `json:"buyerTel,optional"`
  29. WinnerTel string `json:"winnerTel,optional"`
  30. FileExists string `json:"fileExists,optional"`
  31. SearchGroup int64 `json:"searchGroup,optional"`
  32. SearchMode int64 `json:"searchMode,optional"`
  33. WordsMode int64 `json:"wordsMode,optional"`
  34. KeyWords string `json:"keyWords,optional"`
  35. AdditionalWords string `json:"additionalWords,optional"`
  36. ExclusionWords string `json:"exclusionWords,optional"`
  37. BidField string `json:"bidField,optional"` //医疗领域化信息
  38. AccountId string `header:"accountId,optional"` //账户id
  39. PositionType string `header:"positionType,optional"` //职位类型 0个人 1企业
  40. PositionId string `header:"positionId,optional"` //职位id
  41. MgoUserId string `header:"mgoUserId,optional"` //原userId
  42. }
  43. //
  44. commonResp {
  45. Err_code int64 `json:"error_code"`
  46. Err_msg string `json:"error_msg"`
  47. Data interface{} `json:"data"`
  48. }
  49. commonPushResp {
  50. Err_code int64 `json:"error_code"`
  51. Err_msg string `json:"error_msg"`
  52. Data interface{} `json:"data"`
  53. SourceItem interface{} `json:"sourceItem"`
  54. }
  55. //
  56. searchLimitReq {
  57. AppId string `header:"appId,optional"` //appid
  58. TimeOut int64 `json:"timeOut,optional"` //过滤过期时间
  59. Count int64 `json:"count,optional"` //并发量
  60. Flag int64 `json:"flag,optional"` //开关 1:打开;-1:关闭;-2:重置
  61. Percentage int64 `json:"percentage,optional"` //付费用户占比
  62. SearchType string `path:"searchType"` //get|update|
  63. }
  64. //参标项目
  65. baseParam {
  66. EntId int64 `header:"entId,optional"` // 企业id
  67. EntUserId int64 `header:"entUserId,optional"` // 企业下用户id
  68. PositionType int64 `header:"positionType,optional"` // 职位类型 0个人 1企业
  69. PositionId int64 `header:"positionId,optional"` //职位id
  70. AccountId int64 `header:"accountId,optional"` //账户id
  71. MgoUserId string `header:"mgoUserId,optional"` //原userId
  72. AppId string `header:"appId,optional"` //剑鱼10000
  73. UserId string `header:"userId,optional"` //用户id
  74. NewUserId int64 `header:"newUserId,optional"` //base_user_id
  75. EntAccountId int64 `header:"entAccountId,optional"` //企业账户id
  76. Phone string `header:"phone,optional"`
  77. }
  78. // 列表数据参标信息请求参数
  79. participateShowReq {
  80. Ids string `json:"ids"` // 标讯id 逗号分割
  81. baseParam
  82. }
  83. // 详情页参标信息请求参数
  84. participateInfoReq {
  85. Sid string `json:"sid"` // 标讯id
  86. baseParam
  87. }
  88. // 投标状态更新请求参数
  89. updateBidStatusReq {
  90. BidType int64 `json:"bidType"` // 投标类型 1-直接投标 2-渠道投标
  91. BidStage []string `json:"bidStage,optional"` // 投标项目阶段 ["未报名","已报名"...]
  92. IsWin int64 `json:"isWin,optional"` // 是否中标 0-未选择 1-是 2-否
  93. ChannelName string `json:"channelName,optional"` // 渠道名称
  94. ChannelPerson string `json:"channelPerson,optional"` // 联系人
  95. ChannelPhone string `json:"channelPhone,optional"` //联系电话
  96. Winner string `json:"winner,optional"` // 中标单位
  97. Sid string `json:"sid"` // 标讯id
  98. baseParam
  99. }
  100. // 获取投标状态信息
  101. participateContentReq {
  102. Sid string `json:"sid"` // 标讯id
  103. baseParam
  104. }
  105. // 参标操作记录请求参数
  106. participateRecordsReq {
  107. Sid string `json:"sid"` // 标讯id
  108. PageNum int64 `json:"pageNum,default=1"` // 页码
  109. PageSize int64 `json:"pageSize,default=100"` // 每页条数
  110. baseParam
  111. }
  112. // 当前部门/企业下参标人员信息
  113. participatePersonsReq {
  114. baseParam
  115. ProjectId string `json:"projectId,optional"` //项目id
  116. }
  117. //投标状态更新:投标类型-投标项目阶段
  118. BidTypeReq {
  119. Name string `json:"name,optional"`
  120. Content []string `json:"content,optional"`
  121. }
  122. //消息提醒设置:
  123. RemindRuleReq {
  124. BidState string `json:"bidState,optional"` //投标规则类型;直接投标;渠道投标;
  125. Remainder int64 `json:"remainder,optional"` //距离投标截止日期需要多久开始提醒 单位h
  126. Node string `json:"node,optional"` //那个节点进行消息提醒;和投标项目阶段绑定
  127. }
  128. //参标设置信息接口
  129. participateSetUpInfoReq {
  130. baseParam
  131. SetAction string `json:"setAction,optional"` //默认空;U:更新
  132. IsAllow string `json:"isAllow,optional"` //是否允许多人同时参标 默认0;允许1
  133. BidType []*BidTypeReq `json:"bidType,optional"` //投标类型自定义内容
  134. RemindRule []*RemindRuleReq `json:"remindRule,optional"` //消息提醒
  135. }
  136. //用户参标、终止参标及划转接口开发
  137. participateActionReq {
  138. baseParam
  139. BidIds string `json:"bidIds,optional"` //招标信息id ,已加密。多个,号隔开
  140. ProjectIds string `json:"projectIds,optional"` //项目信息id,已加密。多个,号隔开
  141. ToEntUserId string `json:"toEntUserId,optional"` //划转对象的企业用户id
  142. IsRetain bool `json:"isRetain,optional"` //是否保留原跟踪人
  143. ActionType string `path:"actionType,options=in|out|transfer"` //in:参标;out:终止参标;transfer:划转
  144. }
  145. //我的参标项目列表|企业参标项目列表
  146. participateListReq {
  147. baseParam
  148. Area string `json:"area,optional"` //省份
  149. City string `json:"city,optional"` //城市
  150. BidTime string `json:"bidTime,optional"` //招标日期:开始时间-结束时间
  151. BidEndTime string `json:"bidEndTime,optional"` //投标截止日期:格式同上
  152. BidOpenTime string `json:"bidOpenTime,optional"` //开标时间:格式同上
  153. BidEndStatus int64 `json:"bidEndStatus,optional"` //投标截止状态:1:未截止;2:已截止;3:终止参标
  154. BidOpenStatus int64 `json:"bidOpenStatus,optional"` //开标状态:1:未开标;2:已开标
  155. Keywords string `json:"keywords,optional"` //查询项目名称 关键词;多个空格隔开
  156. EntUserIds string `json:"entUserIds,optional"` //企业参标人企业用户id集合,多个,号隔开
  157. PageSize int64 `json:"pageSize,default=10"` //每页数据量
  158. PageNum int64 `json:"pageNum,default=1"` //当前页码
  159. Identity string `path:"identity,options=mine|ent"` //我的:mine;企业:ent
  160. OrderNum int64 `json:"orderNum,default=0"` //排序:0:投标截止日期正序、1:开标时间正序、2:更新状态时间倒叙
  161. }
  162. ptatisticsListReq {
  163. PositionId int64 `header:"positionId,optional"` //职位id
  164. EntId int64 `header:"entId,optional"`
  165. EntUserId int64 `header:"entUserId,optional"`
  166. DeptId int64 `header:"deptId,optional"`
  167. EntUserIdArr []string `json:"entUserIdArr,optional"`
  168. StartTime int64 `json:"startTime,optional"`
  169. EndTime int64 `json:"endTime,optional"`
  170. Source []int64 `json:"source,optional"` // 标讯项目来源 -1:全部 1:个人订阅 2:企业自动分发 3:企业手动分发
  171. BidWay int64 `json:"bidWay,optional"` // 投标类型 -1:全部 1:直接投标 2:渠道投标
  172. IsMobile bool `json:"isMobile,optional"` // 是否是移动端 因为移动端和pc要求展示的不一致
  173. }
  174. polymerizeSearchReq {
  175. SearchCode string `json:"searchCode"`
  176. EntId int64 `header:"entId,optional"` // 企业id
  177. PositionType int64 `header:"positionType,optional"` // 职位类型 0个人 1企业
  178. PositionId int64 `header:"positionId,optional"` //职位id
  179. AccountId int64 `header:"accountId,optional"` //账户id
  180. AppId string `header:"appId,optional"` //剑鱼10000
  181. UserId string `header:"userId,optional"` //用户id
  182. NewUserId int64 `header:"newUserId,optional"` //base_user_id
  183. EntAccountId int64 `header:"entAccountId,optional"` //企业账户id
  184. EntUserId int64 `header:"newUserId,optional"`
  185. }
  186. ProjectDetailReq {
  187. PositionId int64 `header:"positionId,optional"` //职位id
  188. PositionType int64 `header:"positionType,optional"` //职位类型 0个人 1企业
  189. EntId int64 `header:"entId,optional"`
  190. EntUserId int64 `header:"entUserId,optional"`
  191. DeptId int64 `header:"deptId,optional"`
  192. EntUserIdArr []string `json:"entUserIdArr,optional"`
  193. StartTime int64 `json:"startTime,optional"`
  194. EndTime int64 `json:"endTime,optional"`
  195. Source []int64 `json:"source,optional"` // 标讯项目来源 -1:全部 1:个人订阅 2:企业自动分发 3:企业手动分发
  196. BidWay int64 `json:"bidWay,optional"` // 投标类型 -1:全部 1:直接投标 2:渠道投标
  197. Isparticipate int64 `json:"isparticipate,optional"` // 参标状态;-1:全部 0:未参标 1:是
  198. UpdateStartTime int64 `json:"updateStartTime,optional"` //
  199. UpdateEndTime int64 `json:"updateEndTime,optional"` //
  200. PageSize int64 `json:"pageSize,optional"` //
  201. PageNum int64 `json:"pageNum,optional"` //
  202. }
  203. )
  204. service bxcore-api {
  205. @handler searchList
  206. post /jybx/core/:userType/searchList(searchReq) returns (commonResp)
  207. @handler limitSearchContent
  208. post /jybx/core/:searchType/searchLimit(searchLimitReq) returns (commonResp)
  209. @handler participateShow // 列表数据参标信息接口
  210. post /jybx/core/participate/show(participateShowReq) returns (commonResp)
  211. @handler ParticipateInfo // 详情页参标信息接口
  212. post /jybx/core/participate/info(participateInfoReq) returns (commonResp)
  213. @handler updateBidStatus // 投标状态更新
  214. post /jybx/core/participate/updateBidStatus(updateBidStatusReq) returns (commonResp)
  215. @handler ParticipateContent // 获取投标状态信息
  216. post /jybx/core/participate/content(participateContentReq) returns (commonResp)
  217. @handler ParticipateRecords // 参标操作记录
  218. post /jybx/core/participate/records(participateRecordsReq) returns (commonResp)
  219. @handler ParticipatePersons // 当前部门/企业下参标人员信息
  220. post /jybx/core/participate/persons(participatePersonsReq) returns (commonResp)
  221. @handler participateSetUpInfo // 参标设置信息
  222. post /jybx/core/participate/setUpInfo(participateSetUpInfoReq) returns (commonResp)
  223. @handler participateAction //参标|终止参标|划转项目
  224. post /jybx/core/participate/:actionType/info(participateActionReq) returns (commonResp)
  225. @handler participateList //我的参标项目列表|企业参标项目列表
  226. post /jybx/core/participate/:identity/list(participateListReq) returns (commonResp)
  227. @handler pushStatistics // 订阅推送统计
  228. post /jybx/core/statistics/pushStatistics(ptatisticsListReq) returns (commonPushResp)
  229. @handler projectStatistics//参标项目统计
  230. post /jybx/core/statistics/projectStatistics(ptatisticsListReq) returns (commonResp)
  231. @handler polymerizeSearch//参标项目统计
  232. post /jybx/core/polymerizeSearch(polymerizeSearchReq) returns (commonResp)
  233. @handler statisticsProjectDetails//参标项目明细
  234. post /jybx/core/statistics/projectDetails(ProjectDetailReq) returns (commonResp)
  235. }