bxsubscribe.api 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. }
  77. SetReadReq {
  78. AppId string `header:"appId"`
  79. UserId string `header:"userId"`
  80. EntId string `header:"entId,optional"`
  81. EntUserId string `header:"entUserId,optional"`
  82. DeptId string `header:"deptId,optional"` //部门id
  83. Vsid int64 `form:"vsid"`
  84. NewUserId int64 `header:"newUserId"`
  85. IsEnt bool `form:"isEnt,optional"`
  86. UserType string `path:"userType,optional"`
  87. PositionType int64 `header:"positionType,optional"`
  88. }
  89. GetKeyReq {
  90. AppId string `header:"appId"`
  91. UserId string `header:"userId"`
  92. EntId string `header:"entId,optional"`
  93. EntUserId string `header:"entUserId,optional"`
  94. DeptId string `header:"deptId,optional"` //部门id
  95. NewUserId int64 `header:"newUserId"`
  96. IsEnt bool `form:"isEnt,optional"`
  97. UserType string `path:"userType,optional"`
  98. VipPower int64 `form:"ent_buy_vip ,optional"`
  99. MemberPower int64 `form:"ent_buy_member ,optional"`
  100. PowerSource int64 `form:"powerSource,optional"`
  101. UserPower int64 `form:"userPower,optional"`
  102. PositionType int64 `header:"positionType,optional"`
  103. }
  104. DistributorReq {
  105. AppId string `header:"appId"`
  106. EntId string `header:"entId,optional"`
  107. EntUserId string `header:"entUserId,optional"`
  108. UserType string `path:"userType,optional"`
  109. Region string `json:"region,optional"`
  110. SelectIds string `json:"selectIds,optional"`
  111. QueryType string `json:"queryType,optional"`
  112. }
  113. viewStatusReq {
  114. AppId string `header:"appId"`
  115. EntId string `header:"entId,optional"`
  116. EntUserId string `header:"entUserId,optional"`
  117. UserType string `path:"userType,optional"`
  118. InfoId string `json:"infoId,optional"`
  119. }
  120. msgDistributor {
  121. AppId string `header:"appId"`
  122. EntId string `header:"entId,optional"`
  123. EntUserId string `header:"entUserId,optional"`
  124. MessageId string `json:"messageId"`
  125. Staffs string `json:"staffs"`
  126. }
  127. deriveReq {
  128. AppId string `header:"appId"`
  129. UserId string `header:"userId"`
  130. EntId string `header:"entId,optional"`
  131. EntUserId string `header:"entUserId,optional"`
  132. InfoId string `json:"infoId,optional"`
  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. )
  190. service bxsubscribe-api {
  191. @handler subscribeList
  192. post /jybx/subscribe/:userType/list(subscribeReq) returns (commonResp)
  193. @handler someInfo
  194. post /jybx/subscribe/:userType/someInfo(someInfoReq) returns (commonResp)
  195. @handler subscribeUpdate
  196. post /jybx/subscribe/:userType/update(subscribeUpdateReq) returns (commonResp)
  197. @handler ByPushHistory
  198. post /jybx/subscribe/:userType/byPushHistory(subscribeReq) returns (commonResp)
  199. @handler SetRead
  200. post /jybx/subscribe/:userType/setRead(SetReadReq) returns (commonResp)
  201. @handler getKey
  202. post /jybx/subscribe/:userType/getKey(GetKeyReq) returns (commonResp)
  203. @handler distributor
  204. post /jybx/subscribe/:userType/distributor(DistributorReq) returns (commonResp)
  205. @handler viewStatus
  206. post /jybx/subscribe/:userType/viewStatus(viewStatusReq) returns (commonResp)
  207. @handler msgDistributor
  208. post /jybx/subscribe/msgDistributor(msgDistributor) returns (commonResp)
  209. @handler deriveShow //数据导出筛选条件回显
  210. post /jybx/subscribe/deriveShow(deriveReq) returns (commonResp)
  211. @handler deriveDel//数据导出筛选条件删除
  212. post /jybx/subscribe/deriveDel(deriveReq) 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. }