bxsubscribe.api 13 KB

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