bxcore.api 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. }
  15. //标签新增或删除
  16. LabelAction {
  17. UserId string `header:"userId"`
  18. Lids string `json:"lids"` //标签ids
  19. Lname string `json:"lname"` //标签名称
  20. Binfo []string `json:"binfo,optional"` //收藏的招标信息
  21. Laction string `json:"laction"` //用户行为:S添加或绑定标签;D删除标签
  22. }
  23. //获取标签
  24. GetLabelAction {
  25. UserId string `header:"userId"`
  26. }
  27. //获取收藏列表
  28. List {
  29. UserId string `header:"userId"`
  30. Pagenum int64 `json:"pagenum"` //页数
  31. Label string `json:"label"` //标签 用,分隔开
  32. SelectTime string `json:"selectTime,optional"` //收藏时间
  33. Buyerclass string `json:"buyerclass,optional"` //采购单位 用,分隔开
  34. BuyerPhone int64 `json:"buyerPhone,optional"` //是否需要采购单位联系方式 1:需要 -1:不需要 0:未选中
  35. WinnerPhone int64 `json:"winnerPhone,optional"` //是否需要中标单位联系方式 1:需要 -1:不需要 0:未选中
  36. Pagesize int64 `json:"pagesize"` //每页展示数量
  37. }
  38. //新增标签
  39. AddLabel {
  40. UserId string `header:"userId"`
  41. Name string `json:"name"`
  42. }
  43. //招标信息是否被收藏
  44. IsCollAction {
  45. UserId string `header:"userId"`
  46. Bids string `json:"bids"`
  47. Label string `json:"label,optional"`
  48. }
  49. //公共接口返回
  50. CommonRes {
  51. Err_code int `json:"error_code"`
  52. Err_msg string `json:"error_msg"`
  53. Data interface{} `json:"data"`
  54. }
  55. )
  56. service bxcore-api {
  57. //招标信息是否被收藏
  58. @handler IsCollAction
  59. post /bidcoll/isColl (IsCollAction) returns(CommonRes)
  60. //招标信息收藏
  61. @handler BCAction
  62. post /bidcoll/action (BCAction) returns(CommonRes)
  63. //标签新增或删除
  64. @handler LabelAction
  65. post /bidcoll/label (LabelAction) returns(CommonRes)
  66. //获取标签
  67. @handler GetLabelAction
  68. post /bidcoll/getLabel (GetLabelAction) returns(CommonRes)
  69. //获取收藏列表
  70. @handler List
  71. post /bidcoll/list (List) returns(CommonRes)
  72. //添加标签
  73. @handler AddLabel
  74. post /bidcoll/addLabel (AddLabel) returns(CommonRes)
  75. }