bxsubscribe.api 11 KB

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