bxsubscribe.api 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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. GetUserReq {
  128. AppId string `header:"appId"`
  129. EntId int64 `header:"entId,optional"`
  130. EntUserId int64 `header:"entUserId,optional"`
  131. PositionType int64 `header:"positionType,optional"`
  132. UserId string `header:"mgoUserId,optional"`
  133. BaseUserId int64 `header:"newUserId,optional"`
  134. ServiceType string `json:"serviceType,optional"`
  135. PositionId int64 `header:"positionId,optional"`
  136. AccountId int64 `header:"accountId,optional"`
  137. MgoUserId string `header:"mgoUserId,optional"` //原userId
  138. }
  139. SetUserReq {
  140. AppId string `header:"appId"`
  141. EntId int64 `header:"entId,optional"`
  142. EntUserId int64 `header:"entUserId,optional"`
  143. PositionType int64 `header:"positionType,optional"`
  144. UserId string `header:"userId,optional"`
  145. Mail string `json:"mail,optional"`
  146. }
  147. SetPushSetReq {
  148. AppId string `header:"appId"`
  149. EntId int64 `header:"entId,optional"`
  150. EntUserId int64 `header:"entUserId,optional"`
  151. PositionType int64 `header:"positionType,optional"`
  152. UserId string `header:"mgoUserId,optional"`
  153. Item string `json:"item,optional"`
  154. SetType string `json:"setType"`
  155. Ratemode int64 `json:"ratemode,optional"`
  156. Times []string `json:"times,optional"`
  157. PushType string `json:"pushType,optional"`
  158. PushValue int64 `json:"pushValue,optional"`
  159. Interested int64 `json:"interested,optional"`
  160. }
  161. GetStaffSubscribeListReq {
  162. AppId string `header:"appId"`
  163. EntId int64 `header:"entId,optional"`
  164. EntUserId int64 `header:"entUserId,optional"`
  165. EStatus int64 `json:"e_status,optional"`
  166. PStatus int64 `json:"p_status,optional"`
  167. Search string `json:"search,optional"`
  168. PageNum int64 `json:"pageNum,optional"`
  169. PageSize int64 `json:"pageSize,optional"`
  170. }
  171. GetStaffSubscribeDetailReq {
  172. AppId string `header:"appId"`
  173. EntId int64 `header:"entId,optional"`
  174. EntUserId int64 `header:"entUserId,optional"`
  175. Token string `json:"token,optional"`
  176. }
  177. StaffSubscribeCommonResp {
  178. Err_code int64 `json:"error_code"`
  179. Err_msg string `json:"error_msg"`
  180. Data interface{} `json:"data"`
  181. }
  182. )
  183. service bxsubscribe-api {
  184. @handler subscribeList
  185. post /jybx/subscribe/:userType/list(subscribeReq) returns (commonResp)
  186. @handler someInfo
  187. post /jybx/subscribe/:userType/someInfo(someInfoReq) returns (commonResp)
  188. @handler subscribeUpdate
  189. post /jybx/subscribe/:userType/update(subscribeUpdateReq) returns (commonResp)
  190. @handler ByPushHistory
  191. post /jybx/subscribe/:userType/byPushHistory(subscribeReq) returns (commonResp)
  192. @handler SetRead
  193. post /jybx/subscribe/:userType/setRead(SetReadReq) returns (commonResp)
  194. @handler getKey
  195. post /jybx/subscribe/:userType/getKey(GetKeyReq) returns (commonResp)
  196. @handler distributor
  197. post /jybx/subscribe/:userType/distributor(DistributorReq) returns (commonResp)
  198. @handler viewStatus
  199. post /jybx/subscribe/:userType/viewStatus(viewStatusReq) returns (commonResp)
  200. @handler msgDistributor
  201. post /jybx/subscribe/msgDistributor(msgDistributor) returns (commonResp)
  202. @handler getUser //查询用户信息
  203. post /jybx/subscribe/getUser (GetUserReq) returns (commonResp)
  204. @handler setUser //设置用户信息
  205. post /jybx/subscribe/setUser (SetUserReq) returns (commonResp)
  206. @handler getPushSet //推送设置查询
  207. post /jybx/subscribe/getPushSet (GetUserReq) returns (commonResp)
  208. @handler setPushSet //推送设置修改
  209. post /jybx/subscribe/setPushSet (SetPushSetReq) returns (commonResp)
  210. @handler getStaffSubscribeList //查询企业员工订阅状态
  211. post /jybx/subscribe/getStaffSubscribe (GetStaffSubscribeListReq) returns (StaffSubscribeCommonResp)
  212. @handler getStaffSubscribeDetail //查询企业员工订阅详情
  213. post /jybx/subscribe/getStaffSubscribeDetail (GetStaffSubscribeDetailReq) returns (StaffSubscribeCommonResp)
  214. }