bxsubscribe.api 11 KB

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