bxsubscribe.api 11 KB

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