bxsubscribe.api 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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. Source string `json:"source,optional"` //信息来源
  28. IsRead string `json:"isRead,optional"` //是否已读
  29. Staffs string `json:"staffs,optional"` //分发的员工
  30. UserType string `path:"userType,default=fType,options=fType|vType|mType|eType"` //fType:普通用户;vType:超级订阅用户;mType:大会员用户;eType:商机管理用户;
  31. NewUserId int64 `header:"newUserId"`
  32. IsEnt bool `json:"isEnt,optional"`
  33. SelectIds string `json:"selectIds,optional"`
  34. SelectKeys string `json:"selectKeys,optional"`
  35. PositionType int64 `header:"positionType,optional"`
  36. NotReturnCount int64 `json:"notReturnCount,optional"`
  37. Item map[string]interface{} `json:"item,optional"`
  38. AccountId string `header:"accountId,optional"`
  39. PositionId string `header:"positionId,optional"`
  40. MgoUserId string `header:"mgoUserId,optional"` //原userId
  41. District string `json:"district,optional"`
  42. Stag string `json:"stag,optional"` // home
  43. }
  44. //
  45. someInfoReq {
  46. AppId string `header:"appId"`
  47. UserType string `path:"userType"`
  48. UserId string `header:"userId,optional"`
  49. NewUserId string `header:"newUserId,optional"`
  50. EntId string `header:"entId,optional"`
  51. AccountId string `header:"accountId,optional"`
  52. PositionType string `header:"positionType,optional"`
  53. PositionId string `header:"positionId,optional"`
  54. }
  55. //
  56. commonResp {
  57. Err_code int64 `json:"error_code"`
  58. Err_msg string `json:"error_msg"`
  59. Data interface{} `json:"data"`
  60. TimeData interface{} `json:"timeData"`
  61. }
  62. //
  63. subscribeUpdateReq {
  64. Area map[string]interface{} `json:"area,optional"` //地区
  65. Buyerclass []string `json:"buyerclass,optional"` //采购单位类型
  66. Items []map[string]interface{} `json:"items,optional"` //关键词
  67. Infotype []string `json:"infotype,optional"` //信息类型
  68. Matchway string `json:"matchway,optional"` //匹配方式 1标题 2正文
  69. Projectmatch string `json:"projectmatch,optional"` //项目匹配 1开始 0关闭
  70. Ratemode string `json:"ratemode,optional"` // 1:实时推送,2:每天9点推送,3:每周推送,4:每月推送 5:每日推送两次
  71. Apppush string `json:"apppush,optional"` //app推送 1开启 0关闭
  72. Mailpush string `json:"mailpush,optional"` //邮箱推送 1开启 0关闭
  73. Mail string `json:"mail,optional"` //邮箱
  74. Otherbuyerclass string `json:"otherbuyerclass,optional"` //匹配未分类类型 1匹配 0不匹配
  75. AppId string `header:"appId,optional"`
  76. UserType string `path:"userType,optional"`
  77. UserId string `header:"userId,optional"`
  78. PositionType int64 `header:"positionType,optional"`
  79. NewUserId int64 `header:"newUserId,optional"`
  80. EntId int64 `header:"entId,optional"`
  81. AccountId int64 `header:"accountId,optional"`
  82. PositionId int64 `header:"positionId,optional"`
  83. District map[string]interface{} `json:"district,optional"`
  84. }
  85. SetReadReq {
  86. AppId string `header:"appId"`
  87. UserId string `header:"userId"`
  88. EntId string `header:"entId,optional"`
  89. EntUserId string `header:"entUserId,optional"`
  90. DeptId string `header:"deptId,optional"` //部门id
  91. Vsid int64 `form:"vsid"`
  92. NewUserId int64 `header:"newUserId"`
  93. IsEnt bool `form:"isEnt,optional"`
  94. UserType string `path:"userType,optional"`
  95. PositionType int64 `header:"positionType,optional"`
  96. }
  97. GetKeyReq {
  98. AppId string `header:"appId"`
  99. UserId string `header:"userId"`
  100. EntId string `header:"entId,optional"`
  101. EntUserId string `header:"entUserId,optional"`
  102. DeptId string `header:"deptId,optional"` //部门id
  103. NewUserId int64 `header:"newUserId"`
  104. IsEnt bool `form:"isEnt,optional"`
  105. UserType string `path:"userType,optional"`
  106. VipPower int64 `form:"ent_buy_vip ,optional"`
  107. MemberPower int64 `form:"ent_buy_member ,optional"`
  108. PowerSource int64 `form:"powerSource,optional"`
  109. UserPower int64 `form:"userPower,optional"`
  110. PositionType int64 `header:"positionType,optional"`
  111. }
  112. DistributorReq {
  113. AppId string `header:"appId"`
  114. EntId string `header:"entId,optional"`
  115. EntUserId string `header:"entUserId,optional"`
  116. UserType string `path:"userType,optional"`
  117. Region string `json:"region,optional"`
  118. SelectIds string `json:"selectIds,optional"`
  119. QueryType string `json:"queryType,optional"`
  120. }
  121. viewStatusReq {
  122. AppId string `header:"appId"`
  123. EntId string `header:"entId,optional"`
  124. EntUserId string `header:"entUserId,optional"`
  125. UserType string `path:"userType,optional"`
  126. InfoId string `json:"infoId,optional"`
  127. }
  128. msgDistributor {
  129. AppId string `header:"appId"`
  130. EntId string `header:"entId,optional"`
  131. EntUserId string `header:"entUserId,optional"`
  132. MessageId string `json:"messageId"`
  133. Staffs string `json:"staffs"`
  134. }
  135. GetUserReq {
  136. AppId string `header:"appId"`
  137. EntId int64 `header:"entId,optional"`
  138. EntUserId int64 `header:"entUserId,optional"`
  139. PositionType int64 `header:"positionType,optional"`
  140. UserId string `header:"mgoUserId,optional"`
  141. BaseUserId int64 `header:"newUserId,optional"`
  142. ServiceType string `json:"serviceType,optional"`
  143. PositionId int64 `header:"positionId,optional"`
  144. AccountId int64 `header:"accountId,optional"`
  145. MgoUserId string `header:"mgoUserId,optional"` //原userId
  146. }
  147. SetUserReq {
  148. AppId string `header:"appId"`
  149. EntId int64 `header:"entId,optional"`
  150. EntUserId int64 `header:"entUserId,optional"`
  151. PositionType int64 `header:"positionType,optional"`
  152. UserId string `header:"userId,optional"`
  153. Mail string `json:"mail,optional"`
  154. }
  155. SetPushSetReq {
  156. AppId string `header:"appId"`
  157. EntId int64 `header:"entId,optional"`
  158. EntUserId int64 `header:"entUserId,optional"`
  159. PositionType int64 `header:"positionType,optional"`
  160. UserId string `header:"mgoUserId,optional"`
  161. Item string `json:"item,optional"`
  162. SetType string `json:"setType"`
  163. Ratemode int64 `json:"ratemode,optional"`
  164. Times []string `json:"times,optional"`
  165. PushType string `json:"pushType,optional"`
  166. PushValue int64 `json:"pushValue,optional"`
  167. Interested int64 `json:"interested,optional"`
  168. }
  169. GetStaffSubscribeListReq {
  170. AppId string `header:"appId"`
  171. EntId int64 `header:"entId,optional"`
  172. EntUserId int64 `header:"entUserId,optional"`
  173. EStatus int64 `json:"e_status,optional"`
  174. PStatus int64 `json:"p_status,optional"`
  175. Search string `json:"search,optional"`
  176. PageNum int64 `json:"pageNum,optional"`
  177. PageSize int64 `json:"pageSize,optional"`
  178. }
  179. GetStaffSubscribeDetailReq {
  180. AppId string `header:"appId"`
  181. EntId int64 `header:"entId,optional"`
  182. EntUserId int64 `header:"entUserId,optional"`
  183. Token string `json:"token,optional"`
  184. }
  185. StaffSubscribeCommonResp {
  186. Err_code int64 `json:"error_code"`
  187. Err_msg string `json:"error_msg"`
  188. Data interface{} `json:"data"`
  189. }
  190. BidDistributor {
  191. AppId string `header:"appId"`
  192. EntId string `header:"entId,optional"`
  193. EntUserId string `header:"entUserId,optional"`
  194. Infoids []string `json:"infoids"`
  195. Staffs string `json:"staffs"`
  196. }
  197. BidRecListReq {
  198. AppId string `header:"appId"`
  199. UserId string `header:"userId"`
  200. EntId string `header:"entId,optional"`
  201. EntUserId string `header:"entUserId,optional"`
  202. Spath string `json:"spath"` // 页面入口,1: 订阅更多;2:模版消息
  203. PositionType int64 `header:"positionType,optional"`
  204. }
  205. )
  206. service bxsubscribe-api {
  207. @handler subscribeList
  208. post /jybx/subscribe/:userType/list (subscribeReq) returns (commonResp)
  209. @handler someInfo
  210. post /jybx/subscribe/:userType/someInfo (someInfoReq) returns (commonResp)
  211. @handler subscribeUpdate
  212. post /jybx/subscribe/:userType/update (subscribeUpdateReq) returns (commonResp)
  213. @handler ByPushHistory
  214. post /jybx/subscribe/:userType/byPushHistory (subscribeReq) returns (commonResp)
  215. @handler SetRead
  216. post /jybx/subscribe/:userType/setRead (SetReadReq) returns (commonResp)
  217. @handler getKey
  218. post /jybx/subscribe/:userType/getKey (GetKeyReq) returns (commonResp)
  219. @handler distributor
  220. post /jybx/subscribe/:userType/distributor (DistributorReq) returns (commonResp)
  221. @handler viewStatus
  222. post /jybx/subscribe/:userType/viewStatus (viewStatusReq) returns (commonResp)
  223. @handler msgDistributor
  224. post /jybx/subscribe/msgDistributor (msgDistributor) returns (commonResp)
  225. @handler getUser //查询用户信息
  226. post /jybx/subscribe/getUser (GetUserReq) returns (commonResp)
  227. @handler setUser //设置用户信息
  228. post /jybx/subscribe/setUser (SetUserReq) returns (commonResp)
  229. @handler getPushSet //推送设置查询
  230. post /jybx/subscribe/getPushSet (GetUserReq) returns (commonResp)
  231. @handler setPushSet //推送设置修改
  232. post /jybx/subscribe/setPushSet (SetPushSetReq) returns (commonResp)
  233. @handler getStaffSubscribeList //查询企业员工订阅状态
  234. post /jybx/subscribe/getStaffSubscribe (GetStaffSubscribeListReq) returns (StaffSubscribeCommonResp)
  235. @handler getStaffSubscribeDetail //查询企业员工订阅详情
  236. post /jybx/subscribe/getStaffSubscribeDetail (GetStaffSubscribeDetailReq) returns (StaffSubscribeCommonResp)
  237. @handler bidDistributor //标讯分发
  238. post /jybx/subscribe/bidDistributor (BidDistributor) returns (commonResp)
  239. @handler bidRecList // 订阅推荐列表
  240. post /jybx/subscribe/getRecList (BidRecListReq) returns (commonResp)
  241. }