bxsubscribe.api 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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. ISwitch int64 `json:"iSwitch,optional"`
  84. Amount string `json:"amount,optional"`
  85. Matchmode string `json:"matchmode,optional"`
  86. }
  87. SetReadReq {
  88. AppId string `header:"appId"`
  89. UserId string `header:"userId"`
  90. EntId string `header:"entId,optional"`
  91. EntUserId string `header:"entUserId,optional"`
  92. DeptId string `header:"deptId,optional"` //部门id
  93. Vsid int64 `form:"vsid"`
  94. NewUserId int64 `header:"newUserId"`
  95. IsEnt bool `form:"isEnt,optional"`
  96. UserType string `path:"userType,optional"`
  97. PositionType int64 `header:"positionType,optional"`
  98. }
  99. GetKeyReq {
  100. AppId string `header:"appId"`
  101. UserId string `header:"userId"`
  102. EntId string `header:"entId,optional"`
  103. EntUserId string `header:"entUserId,optional"`
  104. DeptId string `header:"deptId,optional"` //部门id
  105. NewUserId int64 `header:"newUserId"`
  106. IsEnt bool `form:"isEnt,optional"`
  107. UserType string `path:"userType,optional"`
  108. VipPower int64 `form:"ent_buy_vip ,optional"`
  109. MemberPower int64 `form:"ent_buy_member ,optional"`
  110. PowerSource int64 `form:"powerSource,optional"`
  111. UserPower int64 `form:"userPower,optional"`
  112. PositionType int64 `header:"positionType,optional"`
  113. }
  114. DistributorReq {
  115. AppId string `header:"appId"`
  116. EntId string `header:"entId,optional"`
  117. EntUserId string `header:"entUserId,optional"`
  118. UserType string `path:"userType,optional"`
  119. Region string `json:"region,optional"`
  120. SelectIds string `json:"selectIds,optional"`
  121. QueryType string `json:"queryType,optional"`
  122. }
  123. viewStatusReq {
  124. AppId string `header:"appId"`
  125. EntId string `header:"entId,optional"`
  126. EntUserId string `header:"entUserId,optional"`
  127. UserType string `path:"userType,optional"`
  128. InfoId string `json:"infoId,optional"`
  129. }
  130. msgDistributor {
  131. AppId string `header:"appId"`
  132. EntId string `header:"entId,optional"`
  133. EntUserId string `header:"entUserId,optional"`
  134. MessageId string `json:"messageId"`
  135. Staffs string `json:"staffs"`
  136. }
  137. GetUserReq {
  138. AppId string `header:"appId"`
  139. EntId int64 `header:"entId,optional"`
  140. EntUserId int64 `header:"entUserId,optional"`
  141. PositionType int64 `header:"positionType,optional"`
  142. UserId string `header:"mgoUserId,optional"`
  143. BaseUserId int64 `header:"newUserId,optional"`
  144. ServiceType string `json:"serviceType,optional"`
  145. PositionId int64 `header:"positionId,optional"`
  146. AccountId int64 `header:"accountId,optional"`
  147. MgoUserId string `header:"mgoUserId,optional"` //原userId
  148. }
  149. SetUserReq {
  150. AppId string `header:"appId"`
  151. EntId int64 `header:"entId,optional"`
  152. EntUserId int64 `header:"entUserId,optional"`
  153. PositionType int64 `header:"positionType,optional"`
  154. UserId string `header:"userId,optional"`
  155. Mail string `json:"mail,optional"`
  156. }
  157. SetPushSetReq {
  158. AppId string `header:"appId"`
  159. EntId int64 `header:"entId,optional"`
  160. EntUserId int64 `header:"entUserId,optional"`
  161. PositionType int64 `header:"positionType,optional"`
  162. UserId string `header:"mgoUserId,optional"`
  163. Item string `json:"item,optional"`
  164. SetType string `json:"setType"`
  165. Ratemode int64 `json:"ratemode,optional"`
  166. Times []string `json:"times,optional"`
  167. PushType string `json:"pushType,optional"`
  168. PushValue int64 `json:"pushValue,optional"`
  169. Interested int64 `json:"interested,optional"`
  170. }
  171. GetStaffSubscribeListReq {
  172. AppId string `header:"appId"`
  173. EntId int64 `header:"entId,optional"`
  174. EntUserId int64 `header:"entUserId,optional"`
  175. EStatus int64 `json:"e_status,optional"`
  176. PStatus int64 `json:"p_status,optional"`
  177. Search string `json:"search,optional"`
  178. PageNum int64 `json:"pageNum,optional"`
  179. PageSize int64 `json:"pageSize,optional"`
  180. }
  181. GetStaffSubscribeDetailReq {
  182. AppId string `header:"appId"`
  183. EntId int64 `header:"entId,optional"`
  184. EntUserId int64 `header:"entUserId,optional"`
  185. Token string `json:"token,optional"`
  186. }
  187. StaffSubscribeCommonResp {
  188. Err_code int64 `json:"error_code"`
  189. Err_msg string `json:"error_msg"`
  190. Data interface{} `json:"data"`
  191. }
  192. BidDistributor {
  193. AppId string `header:"appId"`
  194. EntId string `header:"entId,optional"`
  195. EntUserId string `header:"entUserId,optional"`
  196. Infoids []string `json:"infoids"`
  197. Staffs string `json:"staffs"`
  198. }
  199. )
  200. service bxsubscribe-api {
  201. @handler subscribeList
  202. post /jybx/subscribe/:userType/list(subscribeReq) returns (commonResp)
  203. @handler someInfo
  204. post /jybx/subscribe/:userType/someInfo(someInfoReq) returns (commonResp)
  205. @handler subscribeUpdate
  206. post /jybx/subscribe/:userType/update(subscribeUpdateReq) returns (commonResp)
  207. @handler ByPushHistory
  208. post /jybx/subscribe/:userType/byPushHistory(subscribeReq) returns (commonResp)
  209. @handler SetRead
  210. post /jybx/subscribe/:userType/setRead(SetReadReq) returns (commonResp)
  211. @handler getKey
  212. post /jybx/subscribe/:userType/getKey(GetKeyReq) returns (commonResp)
  213. @handler distributor
  214. post /jybx/subscribe/:userType/distributor(DistributorReq) returns (commonResp)
  215. @handler viewStatus
  216. post /jybx/subscribe/:userType/viewStatus(viewStatusReq) returns (commonResp)
  217. @handler msgDistributor
  218. post /jybx/subscribe/msgDistributor(msgDistributor) returns (commonResp)
  219. @handler getUser //查询用户信息
  220. post /jybx/subscribe/getUser (GetUserReq) returns (commonResp)
  221. @handler setUser //设置用户信息
  222. post /jybx/subscribe/setUser (SetUserReq) returns (commonResp)
  223. @handler getPushSet //推送设置查询
  224. post /jybx/subscribe/getPushSet (GetUserReq) returns (commonResp)
  225. @handler setPushSet //推送设置修改
  226. post /jybx/subscribe/setPushSet (SetPushSetReq) returns (commonResp)
  227. @handler getStaffSubscribeList //查询企业员工订阅状态
  228. post /jybx/subscribe/getStaffSubscribe (GetStaffSubscribeListReq) returns (StaffSubscribeCommonResp)
  229. @handler getStaffSubscribeDetail //查询企业员工订阅详情
  230. post /jybx/subscribe/getStaffSubscribeDetail (GetStaffSubscribeDetailReq) returns (StaffSubscribeCommonResp)
  231. @handler bidDistributor //标讯分发
  232. post /jybx/subscribe/bidDistributor(BidDistributor) returns (commonResp)
  233. }