bxsubscribe.api 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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"`
  14. EntUserId string `header:"entUserId"`
  15. DeptId string `header:"deptId"` //部门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. }
  29. //
  30. someInfoReq {
  31. AppId string `header:"appId"`
  32. UserType string `path:"userType"`
  33. }
  34. //
  35. commonResp {
  36. Err_code int64 `json:"error_code"`
  37. Err_msg string `json:"error_msg"`
  38. Data interface{} `json:"data"`
  39. }
  40. //
  41. subscribeUpdateReq {
  42. Area map[string]interface{} `json:"area,optional"` //地区
  43. Buyerclass []string `json:"buyerclass,optional"` //采购单位类型
  44. Items []map[string]interface{} `json:"items,optional"` //关键词
  45. Infotype []string `json:"infotype,optional"` //信息类型
  46. Matchway string `json:"matchway,optional"` //匹配方式 1标题 2正文
  47. Projectmatch string `json:"projectmatch,optional"` //项目匹配 1开始 0关闭
  48. Ratemode string `json:"ratemode,optional"` // 1:实时推送,2:每天9点推送,3:每周推送,4:每月推送 5:每日推送两次
  49. Apppush string `json:"apppush,optional"` //app推送 1开启 0关闭
  50. Mailpush string `json:"mailpush,optional"` //邮箱推送 1开启 0关闭
  51. Mail string `json:"mail,optional"` //邮箱
  52. Otherbuyerclass string `json:"otherbuyerclass,optional"` //匹配未分类类型 1匹配 0不匹配
  53. AppId string `header:"appId,optional"`
  54. UserType string `path:"userType,optional"`
  55. UserId string `header:"userId,optional"`
  56. }
  57. )
  58. service bxsubscribe-api {
  59. @handler subscribeList
  60. post /jybx/subscribe/:userType/list(subscribeReq) returns (commonResp)
  61. @handler someInfo
  62. post /jybx/subscribe/:userType/someInfo(someInfoReq) returns (commonResp)
  63. @handler subscribeUpdate
  64. post /jybx/subscribe/:userType/update(subscribeUpdateReq) returns (commonResp)
  65. }