bxsubscribe.api 13 KB

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