bxsubscribe.api 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  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. ISwitch int64 `json:"iSwitch,optional"`
  85. Amount string `json:"amount,optional"`
  86. Matchmode string `json:"matchmode,optional"`
  87. }
  88. SetReadReq {
  89. AppId string `header:"appId"`
  90. UserId string `header:"userId"`
  91. EntId string `header:"entId,optional"`
  92. EntUserId string `header:"entUserId,optional"`
  93. DeptId string `header:"deptId,optional"` //部门id
  94. Vsid int64 `form:"vsid"`
  95. NewUserId int64 `header:"newUserId"`
  96. IsEnt bool `form:"isEnt,optional"`
  97. UserType string `path:"userType,optional"`
  98. PositionType int64 `header:"positionType,optional"`
  99. }
  100. GetKeyReq {
  101. AppId string `header:"appId"`
  102. UserId string `header:"userId"`
  103. EntId string `header:"entId,optional"`
  104. EntUserId string `header:"entUserId,optional"`
  105. DeptId string `header:"deptId,optional"` //部门id
  106. NewUserId int64 `header:"newUserId"`
  107. IsEnt bool `form:"isEnt,optional"`
  108. UserType string `path:"userType,optional"`
  109. VipPower int64 `form:"ent_buy_vip ,optional"`
  110. MemberPower int64 `form:"ent_buy_member ,optional"`
  111. PowerSource int64 `form:"powerSource,optional"`
  112. UserPower int64 `form:"userPower,optional"`
  113. PositionType int64 `header:"positionType,optional"`
  114. }
  115. DistributorReq {
  116. AppId string `header:"appId"`
  117. EntId string `header:"entId,optional"`
  118. EntUserId string `header:"entUserId,optional"`
  119. UserType string `path:"userType,optional"`
  120. Region string `json:"region,optional"`
  121. SelectIds string `json:"selectIds,optional"`
  122. QueryType string `json:"queryType,optional"`
  123. }
  124. viewStatusReq {
  125. AppId string `header:"appId"`
  126. EntId string `header:"entId,optional"`
  127. EntUserId string `header:"entUserId,optional"`
  128. UserType string `path:"userType,optional"`
  129. InfoId string `json:"infoId,optional"`
  130. }
  131. msgDistributor {
  132. AppId string `header:"appId"`
  133. EntId string `header:"entId,optional"`
  134. EntUserId string `header:"entUserId,optional"`
  135. MessageId string `json:"messageId"`
  136. Staffs string `json:"staffs"`
  137. }
  138. GetUserReq {
  139. AppId string `header:"appId"`
  140. EntId int64 `header:"entId,optional"`
  141. EntUserId int64 `header:"entUserId,optional"`
  142. PositionType int64 `header:"positionType,optional"`
  143. UserId string `header:"mgoUserId,optional"`
  144. BaseUserId int64 `header:"newUserId,optional"`
  145. ServiceType string `json:"serviceType,optional"`
  146. PositionId int64 `header:"positionId,optional"`
  147. AccountId int64 `header:"accountId,optional"`
  148. MgoUserId string `header:"mgoUserId,optional"` //原userId
  149. }
  150. SetUserReq {
  151. AppId string `header:"appId"`
  152. EntId int64 `header:"entId,optional"`
  153. EntUserId int64 `header:"entUserId,optional"`
  154. PositionType int64 `header:"positionType,optional"`
  155. UserId string `header:"userId,optional"`
  156. Mail string `json:"mail,optional"`
  157. }
  158. SetPushSetReq {
  159. AppId string `header:"appId"`
  160. EntId int64 `header:"entId,optional"`
  161. EntUserId int64 `header:"entUserId,optional"`
  162. PositionType int64 `header:"positionType,optional"`
  163. UserId string `header:"mgoUserId,optional"`
  164. Item string `json:"item,optional"`
  165. SetType string `json:"setType"`
  166. Ratemode int64 `json:"ratemode,optional"`
  167. Times []string `json:"times,optional"`
  168. PushType string `json:"pushType,optional"`
  169. PushValue int64 `json:"pushValue,optional"`
  170. Interested int64 `json:"interested,optional"`
  171. }
  172. GetStaffSubscribeListReq {
  173. AppId string `header:"appId"`
  174. EntId int64 `header:"entId,optional"`
  175. EntUserId int64 `header:"entUserId,optional"`
  176. EStatus int64 `json:"e_status,optional"`
  177. PStatus int64 `json:"p_status,optional"`
  178. Search string `json:"search,optional"`
  179. PageNum int64 `json:"pageNum,optional"`
  180. PageSize int64 `json:"pageSize,optional"`
  181. }
  182. GetStaffSubscribeDetailReq {
  183. AppId string `header:"appId"`
  184. EntId int64 `header:"entId,optional"`
  185. EntUserId int64 `header:"entUserId,optional"`
  186. Token string `json:"token,optional"`
  187. }
  188. StaffSubscribeCommonResp {
  189. Err_code int64 `json:"error_code"`
  190. Err_msg string `json:"error_msg"`
  191. Data interface{} `json:"data"`
  192. }
  193. BidDistributor {
  194. AppId string `header:"appId"`
  195. EntId string `header:"entId,optional"`
  196. EntUserId string `header:"entUserId,optional"`
  197. Infoids []string `json:"infoids"`
  198. Staffs string `json:"staffs"`
  199. }
  200. BidRecListReq {
  201. AppId string `header:"appId"`
  202. UserId string `header:"userId"`
  203. EntId string `header:"entId,optional"`
  204. EntUserId string `header:"entUserId,optional"`
  205. Spath string `json:"spath"` // 页面入口,1: 订阅更多;2:模版消息
  206. PositionType int64 `header:"positionType,optional"`
  207. }
  208. )
  209. service bxsubscribe-api {
  210. @handler subscribeList
  211. post /jybx/subscribe/:userType/list (subscribeReq) returns (commonResp)
  212. @handler someInfo
  213. post /jybx/subscribe/:userType/someInfo (someInfoReq) returns (commonResp)
  214. @handler subscribeUpdate
  215. post /jybx/subscribe/:userType/update (subscribeUpdateReq) returns (commonResp)
  216. @handler ByPushHistory
  217. post /jybx/subscribe/:userType/byPushHistory (subscribeReq) returns (commonResp)
  218. @handler SetRead
  219. post /jybx/subscribe/:userType/setRead (SetReadReq) returns (commonResp)
  220. @handler getKey
  221. post /jybx/subscribe/:userType/getKey (GetKeyReq) returns (commonResp)
  222. @handler distributor
  223. post /jybx/subscribe/:userType/distributor (DistributorReq) returns (commonResp)
  224. @handler viewStatus
  225. post /jybx/subscribe/:userType/viewStatus (viewStatusReq) returns (commonResp)
  226. @handler msgDistributor
  227. post /jybx/subscribe/msgDistributor (msgDistributor) returns (commonResp)
  228. @handler getUser //查询用户信息
  229. post /jybx/subscribe/getUser (GetUserReq) returns (commonResp)
  230. @handler setUser //设置用户信息
  231. post /jybx/subscribe/setUser (SetUserReq) returns (commonResp)
  232. @handler getPushSet //推送设置查询
  233. post /jybx/subscribe/getPushSet (GetUserReq) returns (commonResp)
  234. @handler setPushSet //推送设置修改
  235. post /jybx/subscribe/setPushSet (SetPushSetReq) returns (commonResp)
  236. @handler getStaffSubscribeList //查询企业员工订阅状态
  237. post /jybx/subscribe/getStaffSubscribe (GetStaffSubscribeListReq) returns (StaffSubscribeCommonResp)
  238. @handler getStaffSubscribeDetail //查询企业员工订阅详情
  239. post /jybx/subscribe/getStaffSubscribeDetail (GetStaffSubscribeDetailReq) returns (StaffSubscribeCommonResp)
  240. @handler bidDistributor //标讯分发
  241. post /jybx/subscribe/bidDistributor (BidDistributor) returns (commonResp)
  242. @handler bidRecList // 订阅推荐列表
  243. post /jybx/subscribe/getRecList (BidRecListReq) returns (commonResp)
  244. }