bxbase.api 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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. //招标信息是否被收藏
  10. BCAction {
  11. UserId string `header:"userId"`
  12. Bids []string `json:"bids"`
  13. Baction string `json:"baction"` //R:移除收藏;C:收藏
  14. AppId string `header:"appId"` //appId
  15. }
  16. //标签新增或删除
  17. LabelAction {
  18. UserId string `header:"userId"`
  19. Lids string `json:"lids"` //标签ids
  20. Lname string `json:"lname"` //标签名称
  21. Binfo []string `json:"binfo,optional"` //收藏的招标信息
  22. Laction string `json:"laction"` //用户行为:S添加或绑定标签;D删除标签
  23. AppId string `header:"appId"` //appId
  24. }
  25. //获取标签
  26. GetLabelAction {
  27. UserId string `header:"userId"`
  28. AppId string `header:"appId"` //appId
  29. }
  30. //获取收藏列表
  31. List {
  32. UserId string `header:"userId"`
  33. Pagenum int64 `json:"pagenum"` //页数
  34. Label string `json:"label"` //标签 用,分隔开
  35. SelectTime string `json:"selectTime,optional"` //收藏时间
  36. Buyerclass string `json:"buyerclass,optional"` //采购单位 用,分隔开
  37. BuyerPhone int64 `json:"buyerPhone,optional"` //是否需要采购单位联系方式 1:需要 -1:不需要 0:未选中
  38. WinnerPhone int64 `json:"winnerPhone,optional"` //是否需要中标单位联系方式 1:需要 -1:不需要 0:未选中
  39. Pagesize int64 `json:"pagesize"` //每页展示数量
  40. AppId string `header:"appId"` //appId
  41. }
  42. //新增标签
  43. AddLabel {
  44. UserId string `header:"userId"`
  45. Name string `json:"name"`
  46. AppId string `header:"appId"` //appId
  47. }
  48. //招标信息是否被收藏
  49. IsCollAction {
  50. UserId string `header:"userId"`
  51. Bids string `json:"bids"`
  52. Label string `json:"label,optional"`
  53. AppId string `header:"appId"` //appId
  54. }
  55. //获取筛选条件
  56. ShowSearchScreen {
  57. UserId string `header:"userId"`
  58. AppId string `header:"appId"` //appId
  59. Type string `json:"type,optional"`
  60. BidField string `json:"bidField"` // 领域化自动 medical- 医械通
  61. }
  62. //删除筛选条件
  63. DelSearchScreen {
  64. Id string `json:"id"`
  65. AppId string `header:"appId"` //appId
  66. UserId string `header:"userId"` //userId
  67. }
  68. //保存筛选条件
  69. AddSearchScreen {
  70. UserId string `header:"userId"`
  71. AppId string `header:"appId"` //appId
  72. Type string `header:"type,optional"`
  73. Keywords string `json:"searchvalue,optional"` //搜索词
  74. Publishtime string `json:"publishtime"` //发布时间
  75. City string `json:"city,optional"` //城市
  76. Area string `json:"area,optional"` //地区
  77. Buyer string `json:"buyer,optional"` //采购单位
  78. Winner string `json:"winner,optional"` //采购单位
  79. Agency string `json:"agency,optional"` //采购单位
  80. Subtype string `json:"subtype,optional"` //信息类型
  81. Minprice string `json:"minprice,optional"` //最低价格
  82. Maxprice string `json:"maxprice,optional"` //最高价格
  83. Industry string `json:"industry,optional"` //选中的行业
  84. SelectType string `json:"selectType"` //标题 or 全文
  85. Buyerclass string `json:"buyerclass,optional"` //采购单位行业
  86. Hasbuyertel string `json:"buyertel,optional"` //是否有采购电话
  87. Haswinnertel string `json:"winnertel,optional"` //是否有中标电话
  88. FileExists string `json:"fileExists,optional"` //附件
  89. Notkey string `json:"notkey,optional"` //排除词 关键词:排除词(副:五组,每组最多15个字符)
  90. InKey string `json:"inkey,optional"`
  91. SearchGroup int `json:"searchGroup,optional"` // 搜索分组:默认0:全部;1:招标采购公告;2:超前项目
  92. SearchMode int `json:"searchMode,optional"` // 搜索模式:0:精准搜索;1:模糊搜索
  93. WordsMode int `json:"wordsMode,optional"` // 搜索关键词模式;默认0:包含所有,1:包含任意
  94. AdditionalWords string `json:"additionalWords,optional"` // 关键词:附加关键词(副:五组,每组最多15个字符)
  95. RegionMap map[string]map[string][]string `json:"regionMap,optional"` //区域
  96. BidField string `json:"bidField"` // 领域化自动 medical- 医械通
  97. }
  98. //首页最新招标信息
  99. NewestReq {
  100. City string `json:"city,optional"` //定位城市
  101. IsSearch int64 `json:"isSearch,optional"` //是否根据定位查询es
  102. baseParam
  103. }
  104. baseParam {
  105. AppId string `header:"appId"` //剑鱼10000
  106. EntId int64 `header:"entId,optional"` // 企业id
  107. EntUserId int64 `header:"entUserId,optional"` // 企业下用户id
  108. EntAccountId int64 `header:"entAccountId,optional"` //企业账户id
  109. PositionType int64 `header:"positionType,optional"` // 职位类型 0个人 1企业
  110. PositionId int64 `header:"positionId,optional"` //职位id
  111. AccountId int64 `header:"accountId,optional"` //账户id
  112. MgoUserId string `header:"mgoUserId,optional"` //原userId
  113. UserId string `header:"userId,optional"` //用户id
  114. NewUserId int64 `header:"newUserId,optional"` //base_user_id
  115. Phone string `header:"phone,optional"`
  116. }
  117. //公共接口返回
  118. CommonRes {
  119. Err_code int `json:"error_code"`
  120. Err_msg string `json:"error_msg"`
  121. Data interface{} `json:"data"`
  122. }
  123. //收录情况入参
  124. IncludedReq {
  125. AppId string `header:"appId,default=10000"`
  126. }
  127. // 保存搜索/订阅 列表模式入参
  128. SaveListModeReq {
  129. UserId string `header:"userId"`
  130. Type string `path:"type,options=search|subscribe"` // search 搜索列表 subscribe 订阅列表
  131. Mode int `json:"mode"` // 0-精简列表 1-详细列表
  132. }
  133. // 获取获取搜索/订阅
  134. ShowListModeReq {
  135. UserId string `header:"userId"`
  136. Type string `path:"type,options=search|subscribe"` // search 搜索列表 subscribe 订阅列表
  137. }
  138. )
  139. service bxbase-api {
  140. //招标信息是否被收藏
  141. @handler IsCollAction
  142. post /jybx/base/isColled (IsCollAction) returns(CommonRes)
  143. //招标信息收藏
  144. @handler BCAction
  145. post /jybx/base/collAction (BCAction) returns(CommonRes)
  146. //标签新增或删除
  147. @handler LabelAction
  148. post /jybx/base/label (LabelAction) returns(CommonRes)
  149. //获取标签
  150. @handler GetLabelAction
  151. post /jybx/base/getLabel (GetLabelAction) returns(CommonRes)
  152. //获取收藏列表
  153. @handler List
  154. post /jybx/base/collList (List) returns(CommonRes)
  155. //添加标签
  156. @handler AddLabel
  157. post /jybx/base/addLabel (AddLabel) returns(CommonRes)
  158. //展示筛选条件
  159. @handler ShowSearchScreen
  160. post /jybx/base/showSearchScreen (ShowSearchScreen) returns(CommonRes)
  161. //添加筛选条件
  162. @handler AddSearchScreen
  163. post /jybx/base/addSearchScreen (AddSearchScreen) returns(CommonRes)
  164. //校验筛选条件
  165. @handler CheckSearchScreen
  166. post /jybx/base/checkSearchScreen (AddSearchScreen) returns(CommonRes)
  167. //删除筛选条件
  168. @handler DelSearchScreen
  169. post /jybx/base/delSearchScreen (DelSearchScreen) returns(CommonRes)
  170. //首页最新招标信息
  171. @handler NewestBidding
  172. post /jybx/base/newest (NewestReq) returns(CommonRes)
  173. @doc "收录情况"
  174. @handler Included
  175. post /jybx/base/included (IncludedReq) returns(CommonRes)
  176. }