bxsubscribe.api 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. subscribeReq {
  11. AppId string `header:"appId"`
  12. UserId string `header:"userId"`
  13. EntId string `header:"entId,optional"`
  14. EntUserId string `header:"entUserId,optional"`
  15. DeptId string `header:"deptId,optional"` //部门id
  16. PageNum int64 `json:"pageNum,optional"`
  17. PageSize int64 `json:"pageSize,optional"`
  18. SelectTime string `json:"selectTime,optional"`
  19. Area string `json:"area,optional"`
  20. City string `json:"city,optional"`
  21. Industry string `json:"industry,optional"`
  22. BuyerClass string `json:"buyerClass,optional"`
  23. KeyWords string `json:"keyWords,optional"`
  24. Subtype string `json:"subtype,optional"`
  25. Price string `json:"price,optional"`
  26. FileExists string `json:"fileExists,optional"`
  27. UserType string `path:"userType,default=fType,options=fType|vType|mType|eType"` //fType:普通用户;vType:超级订阅用户;mType:大会员用户;eType:商机管理用户;
  28. NewUserId int64 `header:"newUserId"`
  29. IsEnt bool `json:"isEnt,optional"`
  30. }
  31. //
  32. someInfoReq {
  33. AppId string `header:"appId"`
  34. UserType string `path:"userType"`
  35. NewUserId int64 `header:"newUserId"`
  36. }
  37. //
  38. commonResp {
  39. Err_code int64 `json:"error_code"`
  40. Err_msg string `json:"error_msg"`
  41. Data interface{} `json:"data"`
  42. }
  43. //
  44. subscribeUpdateReq {
  45. Area map[string]interface{} `json:"area,optional"` //地区
  46. Buyerclass []string `json:"buyerclass,optional"` //采购单位类型
  47. Items []map[string]interface{} `json:"items,optional"` //关键词
  48. Infotype []string `json:"infotype,optional"` //信息类型
  49. Matchway string `json:"matchway,optional"` //匹配方式 1标题 2正文
  50. Projectmatch string `json:"projectmatch,optional"` //项目匹配 1开始 0关闭
  51. Ratemode string `json:"ratemode,optional"` // 1:实时推送,2:每天9点推送,3:每周推送,4:每月推送 5:每日推送两次
  52. Apppush string `json:"apppush,optional"` //app推送 1开启 0关闭
  53. Mailpush string `json:"mailpush,optional"` //邮箱推送 1开启 0关闭
  54. Mail string `json:"mail,optional"` //邮箱
  55. Otherbuyerclass string `json:"otherbuyerclass,optional"` //匹配未分类类型 1匹配 0不匹配
  56. AppId string `header:"appId,optional"`
  57. UserType string `path:"userType,optional"`
  58. UserId string `header:"userId,optional"`
  59. }
  60. )
  61. service bxsubscribe-api {
  62. @handler subscribeList
  63. post /jybx/subscribe/:userType/list(subscribeReq) returns (commonResp)
  64. @handler someInfo
  65. post /jybx/subscribe/:userType/someInfo(someInfoReq) returns (commonResp)
  66. @handler subscribeUpdate
  67. post /jybx/subscribe/:userType/update(subscribeUpdateReq) returns (commonResp)
  68. }